mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 20:42:04 +00:00
Make use of NoHash hashing for FileId and CrateId
This commit is contained in:
parent
8dcf4c70c4
commit
d025c5d8d6
22 changed files with 189 additions and 72 deletions
|
@ -52,6 +52,7 @@ use hir::{
|
|||
db::{AstDatabase, DefDatabase, HirDatabase},
|
||||
symbols::FileSymbolKind,
|
||||
};
|
||||
use stdx::hash::NoHashHashSet;
|
||||
|
||||
use crate::{line_index::LineIndex, symbol_index::SymbolsDatabase};
|
||||
pub use rustc_hash::{FxHashMap, FxHashSet, FxHasher};
|
||||
|
@ -118,7 +119,7 @@ impl FileLoader for RootDatabase {
|
|||
fn resolve_path(&self, path: AnchoredPath<'_>) -> Option<FileId> {
|
||||
FileLoaderDelegate(self).resolve_path(path)
|
||||
}
|
||||
fn relevant_crates(&self, file_id: FileId) -> Arc<FxHashSet<CrateId>> {
|
||||
fn relevant_crates(&self, file_id: FileId) -> Arc<NoHashHashSet<CrateId>> {
|
||||
FileLoaderDelegate(self).relevant_crates(file_id)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue