diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-10-11 19:28:44 +0100 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-10-11 19:28:44 +0100 |
commit | 2ba6f18586d02a6dbc32e0bea88f7b4236277ea1 (patch) | |
tree | 59bccb90d4b311ffd5c6adc5934fae91c0fb7740 /crates/ra_analysis/tests | |
parent | 77e9bf9b5fdcd4262e2d9badb42b912f5728d90b (diff) | |
parent | dc2b30e9b6084048e441765b91ef830a836d3dfc (diff) |
Merge #122
122: Use rustc-hash crate r=matklad a=mominul
Replace std's HashMap, HashSet with FxHashMap and FxHashSet.
Closes #121
Thanks!
Co-authored-by: Muhammad Mominul Huque <[email protected]>
Diffstat (limited to 'crates/ra_analysis/tests')
-rw-r--r-- | crates/ra_analysis/tests/tests.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/crates/ra_analysis/tests/tests.rs b/crates/ra_analysis/tests/tests.rs index 334dc5e48..a886cd0ff 100644 --- a/crates/ra_analysis/tests/tests.rs +++ b/crates/ra_analysis/tests/tests.rs | |||
@@ -1,12 +1,13 @@ | |||
1 | extern crate relative_path; | 1 | extern crate relative_path; |
2 | extern crate ra_analysis; | 2 | extern crate ra_analysis; |
3 | extern crate rustc_hash; | ||
3 | extern crate test_utils; | 4 | extern crate test_utils; |
4 | 5 | ||
5 | use std::{ | 6 | use std::{ |
6 | sync::Arc, | 7 | sync::Arc, |
7 | collections::HashMap, | ||
8 | }; | 8 | }; |
9 | 9 | ||
10 | use rustc_hash::FxHashMap; | ||
10 | use relative_path::{RelativePath, RelativePathBuf}; | 11 | use relative_path::{RelativePath, RelativePathBuf}; |
11 | use ra_analysis::{Analysis, AnalysisHost, FileId, FileResolver, JobHandle, CrateGraph, CrateId}; | 12 | use ra_analysis::{Analysis, AnalysisHost, FileId, FileResolver, JobHandle, CrateGraph, CrateId}; |
12 | use test_utils::assert_eq_dbg; | 13 | use test_utils::assert_eq_dbg; |
@@ -131,7 +132,7 @@ fn test_resolve_crate_root() { | |||
131 | 132 | ||
132 | let crate_graph = CrateGraph { | 133 | let crate_graph = CrateGraph { |
133 | crate_roots: { | 134 | crate_roots: { |
134 | let mut m = HashMap::new(); | 135 | let mut m = FxHashMap::default(); |
135 | m.insert(CrateId(1), FileId(1)); | 136 | m.insert(CrateId(1), FileId(1)); |
136 | m | 137 | m |
137 | }, | 138 | }, |