aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_analysis/src
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-10-15 19:25:54 +0100
committerAleksey Kladov <[email protected]>2018-10-15 19:25:54 +0100
commit062019590d70279d82fef3a60a2caf9490f8b97b (patch)
tree9519620f51adfe64716d3ec8f11ecf88bfad0839 /crates/ra_analysis/src
parentd783371b862c15d6d402d68e8edce4e37d63796c (diff)
Switch to the master of salsa
Diffstat (limited to 'crates/ra_analysis/src')
-rw-r--r--crates/ra_analysis/src/db/mod.rs4
-rw-r--r--crates/ra_analysis/src/roots.rs8
2 files changed, 6 insertions, 6 deletions
diff --git a/crates/ra_analysis/src/db/mod.rs b/crates/ra_analysis/src/db/mod.rs
index c54d50252..c84bfa7a8 100644
--- a/crates/ra_analysis/src/db/mod.rs
+++ b/crates/ra_analysis/src/db/mod.rs
@@ -2,9 +2,9 @@ use std::{
2 fmt, 2 fmt,
3 sync::Arc, 3 sync::Arc,
4 hash::{Hash, Hasher}, 4 hash::{Hash, Hasher},
5 collections::HashSet,
6}; 5};
7use salsa; 6use salsa;
7use rustc_hash::FxHashSet;
8use ra_syntax::File; 8use ra_syntax::File;
9use ra_editor::{LineIndex}; 9use ra_editor::{LineIndex};
10use crate::{ 10use crate::{
@@ -63,7 +63,7 @@ salsa::query_group! {
63 63
64#[derive(Default, Debug)] 64#[derive(Default, Debug)]
65pub(crate) struct FileSet { 65pub(crate) struct FileSet {
66 pub(crate) files: HashSet<FileId>, 66 pub(crate) files: FxHashSet<FileId>,
67 pub(crate) resolver: FileResolverImp, 67 pub(crate) resolver: FileResolverImp,
68} 68}
69 69
diff --git a/crates/ra_analysis/src/roots.rs b/crates/ra_analysis/src/roots.rs
index 908f49b0a..692a07ccd 100644
--- a/crates/ra_analysis/src/roots.rs
+++ b/crates/ra_analysis/src/roots.rs
@@ -1,5 +1,4 @@
1use std::{ 1use std::{
2 collections::{HashMap, HashSet},
3 sync::Arc, 2 sync::Arc,
4 panic, 3 panic,
5}; 4};
@@ -8,6 +7,7 @@ use parking_lot::RwLock;
8use once_cell::sync::OnceCell; 7use once_cell::sync::OnceCell;
9use rayon::prelude::*; 8use rayon::prelude::*;
10use salsa::Database; 9use salsa::Database;
10use rustc_hash::{FxHashMap, FxHashSet};
11use ra_editor::LineIndex; 11use ra_editor::LineIndex;
12use ra_syntax::File; 12use ra_syntax::File;
13 13
@@ -40,8 +40,8 @@ impl WritableSourceRoot {
40 file_resolver: Option<FileResolverImp>, 40 file_resolver: Option<FileResolverImp>,
41 ) -> WritableSourceRoot { 41 ) -> WritableSourceRoot {
42 let db = self.db.write(); 42 let db = self.db.write();
43 let mut changed = HashSet::new(); 43 let mut changed = FxHashSet::default();
44 let mut removed = HashSet::new(); 44 let mut removed = FxHashSet::default();
45 for (file_id, text) in changes { 45 for (file_id, text) in changes {
46 match text { 46 match text {
47 None => { 47 None => {
@@ -55,7 +55,7 @@ impl WritableSourceRoot {
55 } 55 }
56 } 56 }
57 let file_set = db.file_set(()); 57 let file_set = db.file_set(());
58 let mut files: HashSet<FileId> = file_set 58 let mut files: FxHashSet<FileId> = file_set
59 .files 59 .files
60 .clone(); 60 .clone();
61 for file_id in removed { 61 for file_id in removed {