diff options
author | Aleksey Kladov <[email protected]> | 2018-10-15 19:25:54 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-10-15 19:25:54 +0100 |
commit | 062019590d70279d82fef3a60a2caf9490f8b97b (patch) | |
tree | 9519620f51adfe64716d3ec8f11ecf88bfad0839 /crates/ra_analysis/src/roots.rs | |
parent | d783371b862c15d6d402d68e8edce4e37d63796c (diff) |
Switch to the master of salsa
Diffstat (limited to 'crates/ra_analysis/src/roots.rs')
-rw-r--r-- | crates/ra_analysis/src/roots.rs | 8 |
1 files changed, 4 insertions, 4 deletions
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 @@ | |||
1 | use std::{ | 1 | use 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; | |||
8 | use once_cell::sync::OnceCell; | 7 | use once_cell::sync::OnceCell; |
9 | use rayon::prelude::*; | 8 | use rayon::prelude::*; |
10 | use salsa::Database; | 9 | use salsa::Database; |
10 | use rustc_hash::{FxHashMap, FxHashSet}; | ||
11 | use ra_editor::LineIndex; | 11 | use ra_editor::LineIndex; |
12 | use ra_syntax::File; | 12 | use 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 { |