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/tests/test.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/libeditor/tests/test.rs') diff --git a/crates/libeditor/tests/test.rs b/crates/libeditor/tests/test.rs index f8365949e..4f4b4b773 100644 --- a/crates/libeditor/tests/test.rs +++ b/crates/libeditor/tests/test.rs @@ -5,7 +5,7 @@ extern crate assert_eq_text; use assert_eq_text::{assert_eq_dbg}; use libeditor::{ - ParsedFile, TextUnit, TextRange, ActionResult, CursorPosition, + ParsedFile, TextUnit, TextRange, ActionResult, highlight, runnables, extend_selection, file_structure, flip_comma, add_derive, matching_brace, }; @@ -177,8 +177,8 @@ fn check_action Option>( let result = f(&file, before_cursor_pos).expect("code action is not applicable"); let actual = result.edit.apply(&before); let actual_cursor_pos = match result.cursor_position { - CursorPosition::Same => result.edit.apply_to_offset(before_cursor_pos).unwrap(), - CursorPosition::Offset(off) => off, + None => result.edit.apply_to_offset(before_cursor_pos).unwrap(), + Some(off) => off, }; let actual = add_cursor(&actual, actual_cursor_pos); assert_eq_text!(after, &actual); -- cgit v1.2.3