aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorShuiRuTian <[email protected]>2021-01-11 16:21:43 +0000
committerShuiRuTian <[email protected]>2021-01-11 16:21:43 +0000
commitcf3042f8818deb67636507241e853ffb6ab2daf3 (patch)
treee35cc53ff551782b53ead97fb1a8e4610beae950 /crates
parentd8773908821a17ba160eaccab45b6813048b1abf (diff)
format
Diffstat (limited to 'crates')
-rw-r--r--crates/rust-analyzer/src/handlers.rs8
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 }