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};
3333
3434fn create_flycheck ( workspaces : & [ ProjectWorkspace ] , config : & FlycheckConfig ) -> Option < Flycheck > {
3535 // 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, .. } => {
4338 let cargo_project_root = cargo. workspace_root ( ) . to_path_buf ( ) ;
4439 Some ( Flycheck :: new ( config. clone ( ) , cargo_project_root) )
45- } )
46- . unwrap_or_else ( || {
40+ }
41+ ProjectWorkspace :: Json { .. } => {
4742 log:: warn!( "Cargo check watching only supported for cargo workspaces, disabling" ) ;
4843 None
49- } )
44+ }
45+ } )
5046}
5147
5248/// `GlobalState` is the primary mutable state of the language server
You can’t perform that action at this time.
0 commit comments