We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d849124 commit c9d9e4cCopy full SHA for c9d9e4c
crates/rust-analyzer/src/handlers.rs
@@ -465,8 +465,11 @@ pub(crate) fn handle_will_rename_files(
465
source_change.file_system_edits.clear();
466
// no collect here because we want to merge text edits on same file ids
467
source_change.extend(source_changes.map(|it| it.source_file_edits).flatten());
468
- let workspace_edit = to_proto::workspace_edit(&snap, source_change)?;
469
- Ok(Some(workspace_edit))
+ if source_change.source_file_edits.is_empty() {
+ Ok(None)
470
+ } else {
471
+ to_proto::workspace_edit(&snap, source_change).map(Some)
472
+ }
473
}
474
475
pub(crate) fn handle_goto_definition(
0 commit comments