@@ -196,15 +196,15 @@ impl GlobalState {
196
196
let ( change, changed_files) = {
197
197
let mut change = Change :: new ( ) ;
198
198
let ( vfs, line_endings_map) = & mut * self . vfs . write ( ) ;
199
- let mut changed_files = vfs. take_changes ( ) ;
199
+ let changed_files = vfs. take_changes ( ) ;
200
200
if changed_files. is_empty ( ) {
201
201
return false ;
202
202
}
203
203
204
204
// We need to fix up the changed events a bit. If we have a create or modify for a file
205
205
// id that is followed by a delete we actually skip observing the file text from the
206
206
// earlier event, to avoid problems later on.
207
- for changed_file in & changed_files {
207
+ for changed_file in changed_files {
208
208
use vfs:: ChangeKind :: * ;
209
209
210
210
file_changes
@@ -240,14 +240,13 @@ impl GlobalState {
240
240
) ) ;
241
241
}
242
242
243
- changed_files. extend (
244
- file_changes
245
- . into_iter ( )
246
- . filter ( |( _, ( change_kind, just_created) ) | {
247
- !matches ! ( ( change_kind, just_created) , ( vfs:: ChangeKind :: Delete , true ) )
248
- } )
249
- . map ( |( file_id, ( change_kind, _) ) | vfs:: ChangedFile { file_id, change_kind } ) ,
250
- ) ;
243
+ let changed_files: Vec < _ > = file_changes
244
+ . into_iter ( )
245
+ . filter ( |( _, ( change_kind, just_created) ) | {
246
+ !matches ! ( ( change_kind, just_created) , ( vfs:: ChangeKind :: Delete , true ) )
247
+ } )
248
+ . map ( |( file_id, ( change_kind, _) ) | vfs:: ChangedFile { file_id, change_kind } )
249
+ . collect ( ) ;
251
250
252
251
// A file was added or deleted
253
252
let mut has_structure_changes = false ;
0 commit comments