aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_analysis/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_analysis/src/lib.rs')
-rw-r--r--crates/ra_analysis/src/lib.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/crates/ra_analysis/src/lib.rs b/crates/ra_analysis/src/lib.rs
index a029f66b4..476d1b438 100644
--- a/crates/ra_analysis/src/lib.rs
+++ b/crates/ra_analysis/src/lib.rs
@@ -288,19 +288,18 @@ impl Analysis {
288 } 288 }
289 pub fn join_lines(&self, file_id: FileId, range: TextRange) -> SourceChange { 289 pub fn join_lines(&self, file_id: FileId, range: TextRange) -> SourceChange {
290 let file = self.imp.file_syntax(file_id); 290 let file = self.imp.file_syntax(file_id);
291 SourceChange::from_local_edit(file_id, "join lines", ra_editor::join_lines(&file, range)) 291 SourceChange::from_local_edit(file_id, ra_editor::join_lines(&file, range))
292 } 292 }
293 pub fn on_enter(&self, position: FilePosition) -> Option<SourceChange> { 293 pub fn on_enter(&self, position: FilePosition) -> Option<SourceChange> {
294 let file = self.imp.file_syntax(position.file_id); 294 let file = self.imp.file_syntax(position.file_id);
295 let edit = ra_editor::on_enter(&file, position.offset)?; 295 let edit = ra_editor::on_enter(&file, position.offset)?;
296 let res = SourceChange::from_local_edit(position.file_id, "on enter", edit); 296 let res = SourceChange::from_local_edit(position.file_id, edit);
297 Some(res) 297 Some(res)
298 } 298 }
299 pub fn on_eq_typed(&self, position: FilePosition) -> Option<SourceChange> { 299 pub fn on_eq_typed(&self, position: FilePosition) -> Option<SourceChange> {
300 let file = self.imp.file_syntax(position.file_id); 300 let file = self.imp.file_syntax(position.file_id);
301 Some(SourceChange::from_local_edit( 301 Some(SourceChange::from_local_edit(
302 position.file_id, 302 position.file_id,
303 "add semicolon",
304 ra_editor::on_eq_typed(&file, position.offset)?, 303 ra_editor::on_eq_typed(&file, position.offset)?,
305 )) 304 ))
306 } 305 }