mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 11:59:49 +00:00
Depend on nohash-hasher individually
This commit is contained in:
parent
1d678cf6a0
commit
4a1922fd1a
20 changed files with 53 additions and 52 deletions
|
@ -16,6 +16,7 @@ doctest = false
|
|||
cov-mark = "2.0.0-pre.1"
|
||||
itertools = "0.10.5"
|
||||
triomphe.workspace = true
|
||||
nohash-hasher.workspace = true
|
||||
|
||||
# local deps
|
||||
hir.workspace = true
|
||||
|
|
|
@ -87,8 +87,8 @@ pub use crate::{errors::SsrError, from_comment::ssr_from_comment, matching::Matc
|
|||
use crate::{errors::bail, matching::MatchFailureReason};
|
||||
use hir::Semantics;
|
||||
use ide_db::base_db::{FileId, FilePosition, FileRange};
|
||||
use nohash_hasher::IntMap;
|
||||
use resolving::ResolvedRule;
|
||||
use stdx::hash::NoHashHashMap;
|
||||
use syntax::{ast, AstNode, SyntaxNode, TextRange};
|
||||
use text_edit::TextEdit;
|
||||
|
||||
|
@ -168,9 +168,9 @@ impl<'db> MatchFinder<'db> {
|
|||
}
|
||||
|
||||
/// Finds matches for all added rules and returns edits for all found matches.
|
||||
pub fn edits(&self) -> NoHashHashMap<FileId, TextEdit> {
|
||||
pub fn edits(&self) -> IntMap<FileId, TextEdit> {
|
||||
use ide_db::base_db::SourceDatabaseExt;
|
||||
let mut matches_by_file = NoHashHashMap::default();
|
||||
let mut matches_by_file = IntMap::default();
|
||||
for m in self.matches().matches {
|
||||
matches_by_file
|
||||
.entry(m.range.file_id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue