aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorSong Gao <[email protected]>2021-01-11 16:16:12 +0000
committerGitHub <[email protected]>2021-01-11 16:16:12 +0000
commit1b004dcf8826b0bc73b69b69683e9bf7d996829b (patch)
tree48ba51793fe0615e7ee1167b5d852471cbfb79be /crates
parent497e9da43361daabfd0cf3653181be86b4163bce (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.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/crates/rust-analyzer/src/handlers.rs b/crates/rust-analyzer/src/handlers.rs
index c1e34c54d..c7b615002 100644
--- a/crates/rust-analyzer/src/handlers.rs
+++ b/crates/rust-analyzer/src/handlers.rs
@@ -437,9 +437,7 @@ pub(crate) fn handle_will_rename_files(
437 // imitate change the older_folder/mod.rs to older_folder/new_folder.rs 437 // imitate change the older_folder/mod.rs to older_folder/new_folder.rs
438 438
439 // add '/' to end of url -- from `file://path/to/folder` to `file://path/to/folder/` 439 // add '/' to end of url -- from `file://path/to/folder` to `file://path/to/folder/`
440 let old_folder_name = from_path.file_stem()?; 440 let mut old_folder_name = from_path.file_stem()?.to_str()?.to_string();
441 let old_folder_name = old_folder_name.to_str()?;
442 let mut old_folder_name = old_folder_name.to_string();
443 old_folder_name.push('/'); 441 old_folder_name.push('/');
444 let from_with_trailing_slash = from.join(&old_folder_name).ok()?; 442 let from_with_trailing_slash = from.join(&old_folder_name).ok()?;
445 443