From 2465fa02b7aa268d7d711b81417e7717427217c3 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 17 Dec 2020 14:17:13 +0300 Subject: Cleaup imports ide should re-export everything it needs. --- crates/ide/src/lib.rs | 14 +++++++------- crates/rust-analyzer/src/to_proto.rs | 12 ++++++------ 2 files changed, 13 insertions(+), 13 deletions(-) (limited to 'crates') diff --git a/crates/ide/src/lib.rs b/crates/ide/src/lib.rs index c5c652cda..4b245c040 100644 --- a/crates/ide/src/lib.rs +++ b/crates/ide/src/lib.rs @@ -57,7 +57,7 @@ use ide_db::{ symbol_index::{self, FileSymbol}, LineIndexDatabase, }; -use syntax::{SourceFile, TextRange, TextSize}; +use syntax::SourceFile; use crate::display::ToNav; @@ -79,21 +79,20 @@ pub use crate::{ HighlightedRange, }, }; +pub use assists::{Assist, AssistConfig, AssistId, AssistKind, ResolvedAssist}; pub use completion::{ CompletionConfig, CompletionItem, CompletionItemKind, CompletionResolveCapability, CompletionScore, ImportEdit, InsertTextFormat, }; -pub use ide_db::{ - call_info::CallInfo, - search::{Reference, ReferenceAccess, ReferenceKind}, -}; - -pub use assists::{Assist, AssistConfig, AssistId, AssistKind, ResolvedAssist}; pub use hir::{Documentation, Semantics}; pub use ide_db::base_db::{ Canceled, Change, CrateGraph, CrateId, Edition, FileId, FilePosition, FileRange, SourceRoot, SourceRootId, }; +pub use ide_db::{ + call_info::CallInfo, + search::{Reference, ReferenceAccess, ReferenceKind}, +}; pub use ide_db::{ label::Label, line_index::{LineCol, LineIndex}, @@ -103,6 +102,7 @@ pub use ide_db::{ RootDatabase, }; pub use ssr::SsrError; +pub use syntax::{TextRange, TextSize}; pub use text_edit::{Indel, TextEdit}; pub type Cancelable = Result; diff --git a/crates/rust-analyzer/src/to_proto.rs b/crates/rust-analyzer/src/to_proto.rs index 72f77a016..1753bbff2 100644 --- a/crates/rust-analyzer/src/to_proto.rs +++ b/crates/rust-analyzer/src/to_proto.rs @@ -5,14 +5,14 @@ use std::{ }; use ide::{ - Assist, AssistKind, CallInfo, CompletionItem, CompletionItemKind, Documentation, - FileSystemEdit, Fold, FoldKind, Highlight, HighlightModifier, HighlightTag, HighlightedRange, - Indel, InlayHint, InlayKind, InsertTextFormat, LineIndex, Markup, NavigationTarget, - ReferenceAccess, ResolvedAssist, Runnable, Severity, SourceChange, SourceFileEdit, TextEdit, + Assist, AssistKind, CallInfo, CompletionItem, CompletionItemKind, Documentation, FileId, + FileRange, FileSystemEdit, Fold, FoldKind, Highlight, HighlightModifier, HighlightTag, + HighlightedRange, Indel, InlayHint, InlayKind, InsertTextFormat, LineIndex, Markup, + NavigationTarget, ReferenceAccess, ResolvedAssist, Runnable, Severity, SourceChange, + SourceFileEdit, TextEdit, TextRange, TextSize, }; -use ide_db::base_db::{FileId, FileRange}; use itertools::Itertools; -use syntax::{SyntaxKind, TextRange, TextSize}; +use syntax::SyntaxKind; use crate::{ cargo_target_spec::CargoTargetSpec, global_state::GlobalStateSnapshot, -- cgit v1.2.3