File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -33,20 +33,16 @@ use rustc_hash::{FxHashMap, FxHashSet};
33
33
34
34
fn create_flycheck ( workspaces : & [ ProjectWorkspace ] , config : & FlycheckConfig ) -> Option < Flycheck > {
35
35
// FIXME: Figure out the multi-workspace situation
36
- workspaces
37
- . iter ( )
38
- . find_map ( |w| match w {
39
- ProjectWorkspace :: Cargo { cargo, .. } => Some ( cargo) ,
40
- ProjectWorkspace :: Json { .. } => None ,
41
- } )
42
- . map ( |cargo| {
36
+ workspaces. iter ( ) . find_map ( |w| match w {
37
+ ProjectWorkspace :: Cargo { cargo, .. } => {
43
38
let cargo_project_root = cargo. workspace_root ( ) . to_path_buf ( ) ;
44
39
Some ( Flycheck :: new ( config. clone ( ) , cargo_project_root) )
45
- } )
46
- . unwrap_or_else ( || {
40
+ }
41
+ ProjectWorkspace :: Json { .. } => {
47
42
log:: warn!( "Cargo check watching only supported for cargo workspaces, disabling" ) ;
48
43
None
49
- } )
44
+ }
45
+ } )
50
46
}
51
47
52
48
/// `GlobalState` is the primary mutable state of the language server
You can’t perform that action at this time.
0 commit comments