File tree Expand file tree Collapse file tree
crates/biome_service/src/scanner Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -316,12 +316,20 @@ impl Watcher {
316316 from : & Utf8Path ,
317317 to : & Utf8Path ,
318318 ) -> Result < Vec < Diagnostic > , WorkspaceError > {
319- if workspace. fs ( ) . path_is_file ( from) {
320- workspace. unload_file ( from) ?;
321- } else {
322- workspace. unload_path ( from) ?;
323- }
324- Self :: index_path ( workspace, to)
319+ fn rename_path (
320+ workspace : & impl WorkspaceWatcherBridge ,
321+ from : & Utf8Path ,
322+ to : & Utf8Path ,
323+ ) -> Result < Vec < Diagnostic > , WorkspaceError > {
324+ let mut diagnostics = vec ! [ ] ;
325+ if workspace. fs ( ) . path_is_file ( from) {
326+ diagnostics. extend ( workspace. unload_file ( from) ?) ;
327+ } else {
328+ diagnostics. extend ( workspace. unload_path ( from) ?) ;
329+ }
330+ diagnostics. extend ( Self :: index_path ( workspace, to) ?) ;
331+ Ok ( diagnostics)
332+ }
325333 }
326334
327335 /// Reindexes an individual file if the watcher (still) has interest in it.
You can’t perform that action at this time.
0 commit comments