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_lsp_server/src/main_loop/subscriptions.rs | |
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_lsp_server/src/main_loop/subscriptions.rs')
-rw-r--r-- | crates/ra_lsp_server/src/main_loop/subscriptions.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_lsp_server/src/main_loop/subscriptions.rs b/crates/ra_lsp_server/src/main_loop/subscriptions.rs index 27f92cc9a..310153382 100644 --- a/crates/ra_lsp_server/src/main_loop/subscriptions.rs +++ b/crates/ra_lsp_server/src/main_loop/subscriptions.rs | |||
@@ -1,13 +1,13 @@ | |||
1 | use std::collections::HashSet; | 1 | use rustc_hash::FxHashSet; |
2 | use ra_analysis::FileId; | 2 | use ra_analysis::FileId; |
3 | 3 | ||
4 | pub struct Subscriptions { | 4 | pub struct Subscriptions { |
5 | subs: HashSet<FileId>, | 5 | subs: FxHashSet<FileId>, |
6 | } | 6 | } |
7 | 7 | ||
8 | impl Subscriptions { | 8 | impl Subscriptions { |
9 | pub fn new() -> Subscriptions { | 9 | pub fn new() -> Subscriptions { |
10 | Subscriptions { subs: HashSet::new() } | 10 | Subscriptions { subs: FxHashSet::default() } |
11 | } | 11 | } |
12 | pub fn add_sub(&mut self, file_id: FileId) { | 12 | pub fn add_sub(&mut self, file_id: FileId) { |
13 | self.subs.insert(file_id); | 13 | self.subs.insert(file_id); |