From e8dfb92641f64b772204d7670c7286cb9b8b398b Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 22 Aug 2018 12:58:34 +0300 Subject: Simplify --- crates/libeditor/src/code_actions.rs | 11 +++-------- crates/libeditor/src/lib.rs | 2 +- 2 files changed, 4 insertions(+), 9 deletions(-) (limited to 'crates/libeditor/src') diff --git a/crates/libeditor/src/code_actions.rs b/crates/libeditor/src/code_actions.rs index 80c396337..500d52c2a 100644 --- a/crates/libeditor/src/code_actions.rs +++ b/crates/libeditor/src/code_actions.rs @@ -11,12 +11,7 @@ use libsyntax2::{ pub struct ActionResult { pub edit: Edit, - pub cursor_position: CursorPosition, -} - -pub enum CursorPosition { - Same, - Offset(TextUnit), + pub cursor_position: Option, } pub fn flip_comma<'a>(file: &'a ParsedFile, offset: TextUnit) -> Option ActionResult + 'a> { @@ -31,7 +26,7 @@ pub fn flip_comma<'a>(file: &'a ParsedFile, offset: TextUnit) -> Option(file: &'a ParsedFile, offset: TextUnit) -> Option