diff options
author | Lukas Wirth <[email protected]> | 2021-03-27 20:51:00 +0000 |
---|---|---|
committer | Lukas Wirth <[email protected]> | 2021-03-27 20:51:00 +0000 |
commit | 1ef55002c2db4ca68df31306290b019c7fbfb4fb (patch) | |
tree | 222f7661669f96792b5b987aba0b26ce07efcf4a /crates/ide_db/src/source_change.rs | |
parent | 77a447dcda82a9f0eb6e1f04bd4b1dd53a226c65 (diff) |
Cleanup ide_db imports
Diffstat (limited to 'crates/ide_db/src/source_change.rs')
-rw-r--r-- | crates/ide_db/src/source_change.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crates/ide_db/src/source_change.rs b/crates/ide_db/src/source_change.rs index b36455d49..846530f78 100644 --- a/crates/ide_db/src/source_change.rs +++ b/crates/ide_db/src/source_change.rs | |||
@@ -37,6 +37,8 @@ impl SourceChange { | |||
37 | } | 37 | } |
38 | } | 38 | } |
39 | 39 | ||
40 | /// Inserts a [`TextEdit`] for the given [`FileId`]. This properly handles merging existing | ||
41 | /// edits for a file if some already exist. | ||
40 | pub fn insert_source_edit(&mut self, file_id: FileId, edit: TextEdit) { | 42 | pub fn insert_source_edit(&mut self, file_id: FileId, edit: TextEdit) { |
41 | match self.source_file_edits.entry(file_id) { | 43 | match self.source_file_edits.entry(file_id) { |
42 | Entry::Occupied(mut entry) => { | 44 | Entry::Occupied(mut entry) => { |