diff options
-rw-r--r-- | crates/rust-analyzer/src/handlers.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/crates/rust-analyzer/src/handlers.rs b/crates/rust-analyzer/src/handlers.rs index 1f21533cb..53e64f106 100644 --- a/crates/rust-analyzer/src/handlers.rs +++ b/crates/rust-analyzer/src/handlers.rs | |||
@@ -447,9 +447,11 @@ pub(crate) fn handle_will_rename_files( | |||
447 | } else { | 447 | } else { |
448 | let old_name = from_path.file_stem()?.to_str()?; | 448 | let old_name = from_path.file_stem()?.to_str()?; |
449 | let new_name = to_path.file_stem()?.to_str()?; | 449 | let new_name = to_path.file_stem()?.to_str()?; |
450 | match(old_name,new_name){ | 450 | match (old_name, new_name) { |
451 | ("mod","mod") =>Some((snap.url_to_file_id(&from).ok()?, new_name.to_string())), | 451 | ("mod", "mod") => { |
452 | _=>None | 452 | Some((snap.url_to_file_id(&from).ok()?, new_name.to_string())) |
453 | } | ||
454 | _ => None, | ||
453 | } | 455 | } |
454 | } | 456 | } |
455 | } | 457 | } |