mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +00:00
Switch to the master of salsa
This commit is contained in:
parent
d783371b86
commit
062019590d
4 changed files with 13 additions and 10 deletions
|
@ -2,9 +2,9 @@ use std::{
|
|||
fmt,
|
||||
sync::Arc,
|
||||
hash::{Hash, Hasher},
|
||||
collections::HashSet,
|
||||
};
|
||||
use salsa;
|
||||
use rustc_hash::FxHashSet;
|
||||
use ra_syntax::File;
|
||||
use ra_editor::{LineIndex};
|
||||
use crate::{
|
||||
|
@ -63,7 +63,7 @@ salsa::query_group! {
|
|||
|
||||
#[derive(Default, Debug)]
|
||||
pub(crate) struct FileSet {
|
||||
pub(crate) files: HashSet<FileId>,
|
||||
pub(crate) files: FxHashSet<FileId>,
|
||||
pub(crate) resolver: FileResolverImp,
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
use std::{
|
||||
collections::{HashMap, HashSet},
|
||||
sync::Arc,
|
||||
panic,
|
||||
};
|
||||
|
@ -8,6 +7,7 @@ use parking_lot::RwLock;
|
|||
use once_cell::sync::OnceCell;
|
||||
use rayon::prelude::*;
|
||||
use salsa::Database;
|
||||
use rustc_hash::{FxHashMap, FxHashSet};
|
||||
use ra_editor::LineIndex;
|
||||
use ra_syntax::File;
|
||||
|
||||
|
@ -40,8 +40,8 @@ impl WritableSourceRoot {
|
|||
file_resolver: Option<FileResolverImp>,
|
||||
) -> WritableSourceRoot {
|
||||
let db = self.db.write();
|
||||
let mut changed = HashSet::new();
|
||||
let mut removed = HashSet::new();
|
||||
let mut changed = FxHashSet::default();
|
||||
let mut removed = FxHashSet::default();
|
||||
for (file_id, text) in changes {
|
||||
match text {
|
||||
None => {
|
||||
|
@ -55,7 +55,7 @@ impl WritableSourceRoot {
|
|||
}
|
||||
}
|
||||
let file_set = db.file_set(());
|
||||
let mut files: HashSet<FileId> = file_set
|
||||
let mut files: FxHashSet<FileId> = file_set
|
||||
.files
|
||||
.clone();
|
||||
for file_id in removed {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue