From f1a5c489fd0e5b0b29f6c6f2537baed379fee460 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 15 May 2020 01:58:39 +0200 Subject: Better structure --- crates/ra_flycheck/src/lib.rs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'crates/ra_flycheck/src') diff --git a/crates/ra_flycheck/src/lib.rs b/crates/ra_flycheck/src/lib.rs index 178485c9e..541179920 100644 --- a/crates/ra_flycheck/src/lib.rs +++ b/crates/ra_flycheck/src/lib.rs @@ -12,6 +12,11 @@ use std::{ use cargo_metadata::Message; use crossbeam_channel::{never, select, unbounded, Receiver, RecvError, Sender}; +pub use cargo_metadata::diagnostic::{ + Applicability, Diagnostic, DiagnosticLevel, DiagnosticSpan, + DiagnosticSpanMacroExpansion, +}; + #[derive(Clone, Debug, PartialEq, Eq)] pub enum FlycheckConfig { CargoCommand { command: String, all_targets: bool, all_features: bool, extra_args: Vec }, @@ -52,7 +57,7 @@ pub enum CheckTask { ClearDiagnostics, /// Request adding a diagnostic with fixes included to a file - AddDiagnostic { workspace_root: PathBuf, diagnostic: cargo_metadata::diagnostic::Diagnostic }, + AddDiagnostic { workspace_root: PathBuf, diagnostic: Diagnostic }, /// Request check progress notification to client Status(Status), @@ -239,12 +244,6 @@ impl FlycheckThread { } } -// #[derive(Debug)] -// pub struct DiagnosticWithFixes { -// diagnostic: Diagnostic, -// fixes: Vec, -// } - enum CheckEvent { Begin, Msg(cargo_metadata::Message), -- cgit v1.2.3