From 5cffef56e2c373f6d67b0f7b70d7ade995795c04 Mon Sep 17 00:00:00 2001 From: Kirill Bulatov Date: Sun, 8 Mar 2020 15:26:57 +0200 Subject: Consider crate declaration names --- crates/ra_ide_db/src/change.rs | 6 +----- crates/ra_ide_db/src/lib.rs | 6 ------ 2 files changed, 1 insertion(+), 11 deletions(-) (limited to 'crates/ra_ide_db') diff --git a/crates/ra_ide_db/src/change.rs b/crates/ra_ide_db/src/change.rs index 8b5be9d21..628cf6416 100644 --- a/crates/ra_ide_db/src/change.rs +++ b/crates/ra_ide_db/src/change.rs @@ -5,7 +5,7 @@ use std::{fmt, sync::Arc, time}; use ra_db::{ salsa::{Database, Durability, SweepStrategy}, - CrateGraph, CrateId, FileId, RelativePathBuf, SourceDatabase, SourceDatabaseExt, SourceRoot, + CrateGraph, FileId, RelativePathBuf, SourceDatabase, SourceDatabaseExt, SourceRoot, SourceRootId, }; use ra_prof::{memory_usage, profile, Bytes}; @@ -88,10 +88,6 @@ impl AnalysisChange { self.crate_graph = Some(graph); } - pub fn set_debug_crate_name(&mut self, crate_id: CrateId, name: String) { - self.debug_data.crate_names.insert(crate_id, name); - } - pub fn set_debug_root_path(&mut self, source_root_id: SourceRootId, path: String) { self.debug_data.root_paths.insert(source_root_id, path); } diff --git a/crates/ra_ide_db/src/lib.rs b/crates/ra_ide_db/src/lib.rs index efa472c7d..a105c7556 100644 --- a/crates/ra_ide_db/src/lib.rs +++ b/crates/ra_ide_db/src/lib.rs @@ -104,10 +104,6 @@ impl RootDatabase { db.query_mut(hir::db::MacroExpandQuery).set_lru_capacity(lru_capacity); db } - - pub fn get_crate_original_name(&self, crate_id: &CrateId) -> Option { - self.debug_data.crate_names.get(crate_id).cloned() - } } impl salsa::ParallelDatabase for RootDatabase { @@ -135,12 +131,10 @@ fn line_index(db: &impl LineIndexDatabase, file_id: FileId) -> Arc { #[derive(Debug, Default, Clone)] pub(crate) struct DebugData { pub(crate) root_paths: FxHashMap, - pub(crate) crate_names: FxHashMap, } impl DebugData { pub(crate) fn merge(&mut self, other: DebugData) { self.root_paths.extend(other.root_paths.into_iter()); - self.crate_names.extend(other.crate_names.into_iter()); } } -- cgit v1.2.3