From 1cd184d6539478c7e54c92835902921976dce5d1 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 10 Apr 2019 10:12:54 +0300 Subject: use either for uses --- crates/ra_hir/src/code_model_impl/module.rs | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'crates/ra_hir/src/code_model_impl') diff --git a/crates/ra_hir/src/code_model_impl/module.rs b/crates/ra_hir/src/code_model_impl/module.rs index 88dee3a69..5c2ea73ce 100644 --- a/crates/ra_hir/src/code_model_impl/module.rs +++ b/crates/ra_hir/src/code_model_impl/module.rs @@ -3,9 +3,9 @@ use ra_syntax::{ast, TreeArc}; use crate::{ Module, ModuleSource, Name, AstId, - nameres::{CrateModuleId, ImportId}, + nameres::CrateModuleId, HirDatabase, DefDatabase, - HirFileId, ImportSource, + HirFileId, }; impl ModuleSource { @@ -68,16 +68,6 @@ impl Module { Some((decl.file_id(), ast)) } - pub(crate) fn import_source_impl( - &self, - db: &impl HirDatabase, - import: ImportId, - ) -> ImportSource { - let (file_id, source) = self.definition_source(db); - let (_, source_map) = db.raw_items_with_source_map(file_id); - source_map.get(&source, import) - } - pub(crate) fn crate_root_impl(&self, db: &impl DefDatabase) -> Module { let def_map = db.crate_def_map(self.krate); self.with_module_id(def_map.root()) -- cgit v1.2.3