diff options
-rw-r--r-- | crates/rust-analyzer/src/handlers.rs | 4 |
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 | ||