aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorSong Gao <[email protected]>2021-01-11 16:15:56 +0000
committerGitHub <[email protected]>2021-01-11 16:15:56 +0000
commit497e9da43361daabfd0cf3653181be86b4163bce (patch)
treefcc16bda1f753aa3a90cfd1a51dac58ec44ae385 /crates
parentf7cb9e9fbe50e5d0e23e81b8b5b90405ef5c1931 (diff)
Update crates/rust-analyzer/src/handlers.rs
Co-authored-by: Jeremy Kolb <[email protected]>
Diffstat (limited to 'crates')
-rw-r--r--crates/rust-analyzer/src/handlers.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/crates/rust-analyzer/src/handlers.rs b/crates/rust-analyzer/src/handlers.rs
index 17f67d4b7..c1e34c54d 100644
--- a/crates/rust-analyzer/src/handlers.rs
+++ b/crates/rust-analyzer/src/handlers.rs
@@ -450,10 +450,8 @@ pub(crate) fn handle_will_rename_files(
450 imite_new_file_name.to_string(), 450 imite_new_file_name.to_string(),
451 )) 451 ))
452 } else { 452 } else {
453 let old_name = from_path.file_stem()?; 453 let old_name = from_path.file_stem()?.to_str()?;
454 let old_name = old_name.to_str()?; 454 let new_name = to_path.file_stem()?.to_str()?;
455 let new_name = to_path.file_stem()?;
456 let new_name = new_name.to_str()?;
457 if old_name != "mod" && new_name != "mod" { 455 if old_name != "mod" && new_name != "mod" {
458 Some((snap.url_to_file_id(&from).ok()?, new_name.to_string())) 456 Some((snap.url_to_file_id(&from).ok()?, new_name.to_string()))
459 } else { 457 } else {