From 009437f5d9949d2276aa26040e03af0ab328acf3 Mon Sep 17 00:00:00 2001 From: ice1000 Date: Tue, 3 Dec 2019 11:07:56 -0500 Subject: Replace `ra_hir_expand::either` with crate --- crates/ra_hir_expand/src/hygiene.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/ra_hir_expand/src/hygiene.rs') diff --git a/crates/ra_hir_expand/src/hygiene.rs b/crates/ra_hir_expand/src/hygiene.rs index 379562a2c..64c8b06c6 100644 --- a/crates/ra_hir_expand/src/hygiene.rs +++ b/crates/ra_hir_expand/src/hygiene.rs @@ -2,12 +2,12 @@ //! //! Specifically, `ast` + `Hygiene` allows you to create a `Name`. Note that, at //! this moment, this is horribly incomplete and handles only `$crate`. +use either::Either; use ra_db::CrateId; use ra_syntax::ast; use crate::{ db::AstDatabase, - either::Either, name::{AsName, Name}, HirFileId, HirFileIdRepr, MacroDefKind, }; @@ -41,9 +41,9 @@ impl Hygiene { pub fn name_ref_to_name(&self, name_ref: ast::NameRef) -> Either { if let Some(def_crate) = self.def_crate { if name_ref.text() == "$crate" { - return Either::B(def_crate); + return Either::Right(def_crate); } } - Either::A(name_ref.as_name()) + Either::Left(name_ref.as_name()) } } -- cgit v1.2.3