@@ -137,15 +137,6 @@ impl WorldState {
137
137
opts
138
138
} ;
139
139
140
- // Create crate graph from all the workspaces
141
- let mut crate_graph = CrateGraph :: default ( ) ;
142
- let mut load = |path : & std:: path:: Path | {
143
- // Some path from metadata will be non canonicalized, e.g. /foo/../bar/lib.rs
144
- let path = path. canonicalize ( ) . ok ( ) ?;
145
- let vfs_file = vfs. load ( & path) ;
146
- vfs_file. map ( |f| FileId ( f. 0 ) )
147
- } ;
148
-
149
140
let proc_macro_client = match & config. proc_macro_srv {
150
141
None => ProcMacroClient :: dummy ( ) ,
151
142
Some ( ( path, args) ) => match ProcMacroClient :: extern_process ( path. into ( ) , args) {
@@ -161,19 +152,22 @@ impl WorldState {
161
152
} ,
162
153
} ;
163
154
164
- workspaces
165
- . iter ( )
166
- . map ( |ws| {
167
- ws. to_crate_graph (
168
- & default_cfg_options,
169
- & extern_source_roots,
170
- & proc_macro_client,
171
- & mut load,
172
- )
173
- } )
174
- . for_each ( |graph| {
175
- crate_graph. extend ( graph) ;
176
- } ) ;
155
+ // Create crate graph from all the workspaces
156
+ let mut crate_graph = CrateGraph :: default ( ) ;
157
+ let mut load = |path : & Path | {
158
+ // Some path from metadata will be non canonicalized, e.g. /foo/../bar/lib.rs
159
+ let path = path. canonicalize ( ) . ok ( ) ?;
160
+ let vfs_file = vfs. load ( & path) ;
161
+ vfs_file. map ( |f| FileId ( f. 0 ) )
162
+ } ;
163
+ for ws in workspaces. iter ( ) {
164
+ crate_graph. extend ( ws. to_crate_graph (
165
+ & default_cfg_options,
166
+ & extern_source_roots,
167
+ & proc_macro_client,
168
+ & mut load,
169
+ ) ) ;
170
+ }
177
171
change. set_crate_graph ( crate_graph) ;
178
172
179
173
let flycheck = config. check . as_ref ( ) . and_then ( |c| create_flycheck ( & workspaces, c) ) ;
0 commit comments