aboutsummaryrefslogtreecommitdiff
path: root/crates/libanalysis/src/api.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/libanalysis/src/api.rs')
-rw-r--r--crates/libanalysis/src/api.rs16
1 files changed, 0 insertions, 16 deletions
diff --git a/crates/libanalysis/src/api.rs b/crates/libanalysis/src/api.rs
index 6c06e0b32..02eaf7b1c 100644
--- a/crates/libanalysis/src/api.rs
+++ b/crates/libanalysis/src/api.rs
@@ -109,19 +109,3 @@ impl Analysis {
109 self.imp.diagnostics(file_id) 109 self.imp.diagnostics(file_id)
110 } 110 }
111} 111}
112
113impl SourceChange {
114 pub(crate) fn from_local_edit(file_id: FileId, label: &str, edit: LocalEdit) -> SourceChange {
115 let file_edit = SourceFileEdit {
116 file_id,
117 edits: edit.edit.into_atoms(),
118 };
119 SourceChange {
120 label: label.to_string(),
121 source_file_edits: vec![file_edit],
122 file_system_edits: vec![],
123 cursor_position: edit.cursor_position
124 .map(|offset| Position { offset, file_id })
125 }
126 }
127}