From 28ddecf6c99ef23bc96b9eb7bc8ee049f1732e76 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 6 Dec 2018 21:16:37 +0300 Subject: modernize even more --- crates/ra_editor/src/lib.rs | 11 +---------- crates/ra_editor/src/test_utils.rs | 5 +++-- crates/ra_editor/src/typing.rs | 2 +- 3 files changed, 5 insertions(+), 13 deletions(-) (limited to 'crates/ra_editor') diff --git a/crates/ra_editor/src/lib.rs b/crates/ra_editor/src/lib.rs index c6b116159..ce080ee97 100644 --- a/crates/ra_editor/src/lib.rs +++ b/crates/ra_editor/src/lib.rs @@ -1,12 +1,3 @@ -extern crate itertools; -extern crate join_to_string; -extern crate ra_syntax; -extern crate rustc_hash; -extern crate superslice; -#[cfg(test)] -#[macro_use] -extern crate test_utils as _test_utils; - mod code_actions; mod edit; mod extend_selection; @@ -154,7 +145,7 @@ pub fn find_node_at_offset<'a, N: AstNode<'a>>( #[cfg(test)] mod tests { use super::*; - use crate::test_utils::{add_cursor, assert_eq_dbg, extract_offset}; + use crate::test_utils::{add_cursor, assert_eq_dbg, extract_offset, assert_eq_text}; #[test] fn test_highlighting() { diff --git a/crates/ra_editor/src/test_utils.rs b/crates/ra_editor/src/test_utils.rs index cbeb6433b..f0a4f250a 100644 --- a/crates/ra_editor/src/test_utils.rs +++ b/crates/ra_editor/src/test_utils.rs @@ -1,7 +1,8 @@ -use crate::LocalEdit; -pub use crate::_test_utils::*; use ra_syntax::{SourceFileNode, TextRange, TextUnit}; +use crate::LocalEdit; +pub use test_utils::*; + pub fn check_action Option>( before: &str, after: &str, diff --git a/crates/ra_editor/src/typing.rs b/crates/ra_editor/src/typing.rs index f894d8392..9703e0371 100644 --- a/crates/ra_editor/src/typing.rs +++ b/crates/ra_editor/src/typing.rs @@ -238,7 +238,7 @@ fn compute_ws(left: SyntaxNodeRef, right: SyntaxNodeRef) -> &'static str { #[cfg(test)] mod tests { use super::*; - use crate::test_utils::{add_cursor, check_action, extract_offset, extract_range}; + use crate::test_utils::{add_cursor, check_action, extract_offset, extract_range, assert_eq_text}; fn check_join_lines(before: &str, after: &str) { check_action(before, after, |file, offset| { -- cgit v1.2.3