File tree Expand file tree Collapse file tree 1 file changed +16
-14
lines changed
crates/rust-analyzer/src/config Expand file tree Collapse file tree 1 file changed +16
-14
lines changed Original file line number Diff line number Diff line change @@ -205,7 +205,7 @@ impl ConfigDb {
205
205
}
206
206
} ) ;
207
207
let parent_changes = if let Some ( source_roots) = source_root_change {
208
- source_roots
208
+ let parent_changes = source_roots
209
209
. iter ( )
210
210
. flat_map ( |path : & AbsPathBuf | {
211
211
path. ancestors ( )
@@ -219,7 +219,21 @@ impl ConfigDb {
219
219
. tuple_windows ( )
220
220
. map ( |( a, b) | ( a, ConfigParent :: Parent ( b) ) )
221
221
} )
222
- . collect :: < FxHashMap < _ , _ > > ( )
222
+ . collect :: < FxHashMap < _ , _ > > ( ) ;
223
+
224
+ // Remove source roots (& their parent config files) that are no longer part of the project root
225
+ self . known_file_ids
226
+ . iter ( )
227
+ . cloned ( )
228
+ . filter ( |& x| x != self . xdg_config_file_id && !parent_changes. contains_key ( & x) )
229
+ . collect_vec ( )
230
+ . into_iter ( )
231
+ . for_each ( |deleted| {
232
+ self . known_file_ids . remove ( & deleted) ;
233
+ self . reset_node ( deleted) ;
234
+ } ) ;
235
+
236
+ parent_changes
223
237
} else {
224
238
Default :: default ( )
225
239
} ;
@@ -237,18 +251,6 @@ impl ConfigDb {
237
251
}
238
252
}
239
253
240
- // Remove source roots (& their parent config files) that are no longer part of the project root
241
- self . known_file_ids
242
- . iter ( )
243
- . cloned ( )
244
- . filter ( |& x| x != self . xdg_config_file_id && !parent_changes. contains_key ( & x) )
245
- . collect_vec ( )
246
- . into_iter ( )
247
- . for_each ( |deleted| {
248
- self . known_file_ids . remove ( & deleted) ;
249
- self . reset_node ( deleted) ;
250
- } ) ;
251
-
252
254
let inner = ConfigChangesInner {
253
255
ra_toml_changes : changes. ra_toml_changes ,
254
256
client_change : changes. client_change ,
You can’t perform that action at this time.
0 commit comments