Replace ra_hir_expand::either with crate
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
//! FIXME: write short doc here
|
||||
|
||||
use hir::{AssocItem, Either, FieldSource, HasSource, InFile, ModuleSource};
|
||||
use either::Either;
|
||||
use hir::{AssocItem, FieldSource, HasSource, InFile, ModuleSource};
|
||||
use ra_db::{FileId, SourceDatabase};
|
||||
use ra_syntax::{
|
||||
ast::{self, DocCommentsOwner, NameOwner},
|
||||
@@ -342,10 +343,10 @@ impl ToNav for hir::Local {
|
||||
fn to_nav(&self, db: &RootDatabase) -> NavigationTarget {
|
||||
let src = self.source(db);
|
||||
let (full_range, focus_range) = match src.value {
|
||||
Either::A(it) => {
|
||||
Either::Left(it) => {
|
||||
(it.syntax().text_range(), it.name().map(|it| it.syntax().text_range()))
|
||||
}
|
||||
Either::B(it) => (it.syntax().text_range(), Some(it.self_kw_token().text_range())),
|
||||
Either::Right(it) => (it.syntax().text_range(), Some(it.self_kw_token().text_range())),
|
||||
};
|
||||
let name = match self.name(db) {
|
||||
Some(it) => it.to_string().into(),
|
||||
|
||||
Reference in New Issue
Block a user