aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_analysis/tests
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2018-10-11 19:28:44 +0100
committerbors[bot] <bors[bot]@users.noreply.github.com>2018-10-11 19:28:44 +0100
commit2ba6f18586d02a6dbc32e0bea88f7b4236277ea1 (patch)
tree59bccb90d4b311ffd5c6adc5934fae91c0fb7740 /crates/ra_analysis/tests
parent77e9bf9b5fdcd4262e2d9badb42b912f5728d90b (diff)
parentdc2b30e9b6084048e441765b91ef830a836d3dfc (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.rs5
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 @@
1extern crate relative_path; 1extern crate relative_path;
2extern crate ra_analysis; 2extern crate ra_analysis;
3extern crate rustc_hash;
3extern crate test_utils; 4extern crate test_utils;
4 5
5use std::{ 6use std::{
6 sync::Arc, 7 sync::Arc,
7 collections::HashMap,
8}; 8};
9 9
10use rustc_hash::FxHashMap;
10use relative_path::{RelativePath, RelativePathBuf}; 11use relative_path::{RelativePath, RelativePathBuf};
11use ra_analysis::{Analysis, AnalysisHost, FileId, FileResolver, JobHandle, CrateGraph, CrateId}; 12use ra_analysis::{Analysis, AnalysisHost, FileId, FileResolver, JobHandle, CrateGraph, CrateId};
12use test_utils::assert_eq_dbg; 13use 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 },