diff options
author | Ville Penttinen <[email protected]> | 2019-03-25 07:13:58 +0000 |
---|---|---|
committer | Ville Penttinen <[email protected]> | 2019-03-25 07:13:58 +0000 |
commit | 4d26bae46db1e4d7a72f9808e7d19ea11fd3bd7d (patch) | |
tree | 9007703d98bb2405b99a19c049364c8ce457f8b1 /crates/ra_ide_api/src/lib.rs | |
parent | b92fcbc9567674cd240cc533aa021f63019ec38d (diff) |
Rename source_edit to source_file_edit to match file_system_edit
Diffstat (limited to 'crates/ra_ide_api/src/lib.rs')
-rw-r--r-- | crates/ra_ide_api/src/lib.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/crates/ra_ide_api/src/lib.rs b/crates/ra_ide_api/src/lib.rs index 928f3d604..8aa3eb088 100644 --- a/crates/ra_ide_api/src/lib.rs +++ b/crates/ra_ide_api/src/lib.rs | |||
@@ -115,7 +115,7 @@ impl SourceChange { | |||
115 | 115 | ||
116 | /// Creates a new SourceChange with the given label, | 116 | /// Creates a new SourceChange with the given label, |
117 | /// containing only the given `SourceFileEdits`. | 117 | /// containing only the given `SourceFileEdits`. |
118 | pub(crate) fn source_edits<L: Into<String>>(label: L, edits: Vec<SourceFileEdit>) -> Self { | 118 | pub(crate) fn source_file_edits<L: Into<String>>(label: L, edits: Vec<SourceFileEdit>) -> Self { |
119 | SourceChange { | 119 | SourceChange { |
120 | label: label.into(), | 120 | label: label.into(), |
121 | source_file_edits: edits, | 121 | source_file_edits: edits, |
@@ -137,8 +137,8 @@ impl SourceChange { | |||
137 | 137 | ||
138 | /// Creates a new SourceChange with the given label, | 138 | /// Creates a new SourceChange with the given label, |
139 | /// containing only a single `SourceFileEdit`. | 139 | /// containing only a single `SourceFileEdit`. |
140 | pub(crate) fn source_edit<L: Into<String>>(label: L, edit: SourceFileEdit) -> Self { | 140 | pub(crate) fn source_file_edit<L: Into<String>>(label: L, edit: SourceFileEdit) -> Self { |
141 | SourceChange::source_edits(label, vec![edit]) | 141 | SourceChange::source_file_edits(label, vec![edit]) |
142 | } | 142 | } |
143 | 143 | ||
144 | /// Creates a new SourceChange with the given label | 144 | /// Creates a new SourceChange with the given label |
@@ -148,7 +148,7 @@ impl SourceChange { | |||
148 | file_id: FileId, | 148 | file_id: FileId, |
149 | edit: TextEdit, | 149 | edit: TextEdit, |
150 | ) -> Self { | 150 | ) -> Self { |
151 | SourceChange::source_edit(label, SourceFileEdit { file_id, edit }) | 151 | SourceChange::source_file_edit(label, SourceFileEdit { file_id, edit }) |
152 | } | 152 | } |
153 | 153 | ||
154 | /// Creates a new SourceChange with the given label | 154 | /// Creates a new SourceChange with the given label |
@@ -358,7 +358,7 @@ impl Analysis { | |||
358 | file_id: frange.file_id, | 358 | file_id: frange.file_id, |
359 | edit: join_lines::join_lines(&file, frange.range), | 359 | edit: join_lines::join_lines(&file, frange.range), |
360 | }; | 360 | }; |
361 | SourceChange::source_edit("join lines", file_edit) | 361 | SourceChange::source_file_edit("join lines", file_edit) |
362 | } | 362 | } |
363 | 363 | ||
364 | /// Returns an edit which should be applied when opening a new line, fixing | 364 | /// Returns an edit which should be applied when opening a new line, fixing |
@@ -373,7 +373,7 @@ impl Analysis { | |||
373 | pub fn on_eq_typed(&self, position: FilePosition) -> Option<SourceChange> { | 373 | pub fn on_eq_typed(&self, position: FilePosition) -> Option<SourceChange> { |
374 | let file = self.db.parse(position.file_id); | 374 | let file = self.db.parse(position.file_id); |
375 | let edit = typing::on_eq_typed(&file, position.offset)?; | 375 | let edit = typing::on_eq_typed(&file, position.offset)?; |
376 | Some(SourceChange::source_edit( | 376 | Some(SourceChange::source_file_edit( |
377 | "add semicolon", | 377 | "add semicolon", |
378 | SourceFileEdit { edit, file_id: position.file_id }, | 378 | SourceFileEdit { edit, file_id: position.file_id }, |
379 | )) | 379 | )) |