From 70333c8edfd9fd958ceb5669b578a33a289473fe Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 25 Aug 2018 11:47:24 +0300 Subject: remove reesports --- crates/cli/Cargo.toml | 1 + crates/cli/src/main.rs | 4 +++- crates/libeditor/src/lib.rs | 2 +- crates/libeditor/tests/test.rs | 3 ++- 4 files changed, 7 insertions(+), 3 deletions(-) (limited to 'crates') diff --git a/crates/cli/Cargo.toml b/crates/cli/Cargo.toml index ac89a48d3..7dbbe3f4e 100644 --- a/crates/cli/Cargo.toml +++ b/crates/cli/Cargo.toml @@ -7,5 +7,6 @@ publish = false [dependencies] clap = "2.32.0" failure = "0.1.1" +libsyntax2 = { path = "../libsyntax2" } libeditor = { path = "../libeditor" } tools = { path = "../tools" } diff --git a/crates/cli/src/main.rs b/crates/cli/src/main.rs index fc28691fc..bcb0c9b98 100644 --- a/crates/cli/src/main.rs +++ b/crates/cli/src/main.rs @@ -1,6 +1,7 @@ extern crate clap; #[macro_use] extern crate failure; +extern crate libsyntax2; extern crate libeditor; extern crate tools; @@ -10,7 +11,8 @@ use std::{ }; use clap::{App, Arg, SubCommand}; use tools::collect_tests; -use libeditor::{File, syntax_tree, file_structure}; +use libsyntax2::File; +use libeditor::{syntax_tree, file_structure}; type Result = ::std::result::Result; diff --git a/crates/libeditor/src/lib.rs b/crates/libeditor/src/lib.rs index a6e6deba7..da337cca0 100644 --- a/crates/libeditor/src/lib.rs +++ b/crates/libeditor/src/lib.rs @@ -10,11 +10,11 @@ mod code_actions; mod typing; use libsyntax2::{ + File, TextUnit, TextRange, ast::{AstNode, NameOwner}, algo::{walk, find_leaf_at_offset}, SyntaxKind::{self, *}, }; -pub use libsyntax2::{File, TextRange, TextUnit}; pub use self::{ line_index::{LineIndex, LineCol}, extend_selection::extend_selection, diff --git a/crates/libeditor/tests/test.rs b/crates/libeditor/tests/test.rs index 3114a128e..ab325c520 100644 --- a/crates/libeditor/tests/test.rs +++ b/crates/libeditor/tests/test.rs @@ -4,8 +4,9 @@ extern crate libsyntax2; extern crate assert_eq_text; use assert_eq_text::{assert_eq_dbg}; +use libsyntax2::{File, TextUnit, TextRange}; use libeditor::{ - File, TextUnit, TextRange, ActionResult, + ActionResult, highlight, runnables, extend_selection, file_structure, flip_comma, add_derive, add_impl, matching_brace, join_lines, -- cgit v1.2.3