Skip to content

Commit 63a6f0d

Browse files
Merge pull request #22779 from Shourya742/2026-07-13-remove-tree-mutator-from-ide-db
Remove tree mutator from source_change in ide-db
2 parents 3ebd5e3 + 9b0c9a2 commit 63a6f0d

1 file changed

Lines changed: 0 additions & 12 deletions

File tree

crates/ide-db/src/source_change.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -232,17 +232,10 @@ pub struct SourceChangeBuilder {
232232
/// Keeps track of which annotations correspond to which snippets
233233
pub snippet_annotations: Vec<(AnnotationSnippet, SyntaxAnnotation)>,
234234

235-
/// Maps the original, immutable `SyntaxNode` to a `clone_for_update` twin.
236-
mutated_tree: Option<TreeMutator>,
237235
/// Keeps track of where to place snippets
238236
pub snippet_builder: Option<SnippetBuilder>,
239237
}
240238

241-
struct TreeMutator {
242-
immutable: SyntaxNode,
243-
mutable_clone: SyntaxNode,
244-
}
245-
246239
#[derive(Default)]
247240
pub struct SnippetBuilder {
248241
/// Where to place snippets at
@@ -258,7 +251,6 @@ impl SourceChangeBuilder {
258251
command: None,
259252
file_editors: FxHashMap::default(),
260253
snippet_annotations: vec![],
261-
mutated_tree: None,
262254
snippet_builder: None,
263255
}
264256
}
@@ -343,10 +335,6 @@ impl SourceChangeBuilder {
343335
)
344336
});
345337

346-
if let Some(tm) = self.mutated_tree.take() {
347-
diff(&tm.immutable, &tm.mutable_clone).into_text_edit(&mut self.edit);
348-
}
349-
350338
let edit = mem::take(&mut self.edit).finish();
351339
if !edit.is_empty() || snippet_edit.is_some() {
352340
self.source_change.insert_source_and_snippet_edit(self.file_id, edit, snippet_edit);

0 commit comments

Comments
 (0)