diff options
Diffstat (limited to 'crates/ra_ide_db')
-rw-r--r-- | crates/ra_ide_db/Cargo.toml | 2 | ||||
-rw-r--r-- | crates/ra_ide_db/src/change.rs | 6 | ||||
-rw-r--r-- | crates/ra_ide_db/src/lib.rs | 2 | ||||
-rw-r--r-- | crates/ra_ide_db/src/symbol_index.rs | 4 |
4 files changed, 4 insertions, 10 deletions
diff --git a/crates/ra_ide_db/Cargo.toml b/crates/ra_ide_db/Cargo.toml index 52f0f23df..de4f5bce0 100644 --- a/crates/ra_ide_db/Cargo.toml +++ b/crates/ra_ide_db/Cargo.toml | |||
@@ -13,7 +13,7 @@ wasm = [] | |||
13 | [dependencies] | 13 | [dependencies] |
14 | log = "0.4.8" | 14 | log = "0.4.8" |
15 | rayon = "1.3.0" | 15 | rayon = "1.3.0" |
16 | fst = { version = "0.3.5", default-features = false } | 16 | fst = { version = "0.4", default-features = false } |
17 | rustc-hash = "1.1.0" | 17 | rustc-hash = "1.1.0" |
18 | superslice = "1.0.0" | 18 | superslice = "1.0.0" |
19 | once_cell = "1.3.1" | 19 | once_cell = "1.3.1" |
diff --git a/crates/ra_ide_db/src/change.rs b/crates/ra_ide_db/src/change.rs index 8b5be9d21..628cf6416 100644 --- a/crates/ra_ide_db/src/change.rs +++ b/crates/ra_ide_db/src/change.rs | |||
@@ -5,7 +5,7 @@ use std::{fmt, sync::Arc, time}; | |||
5 | 5 | ||
6 | use ra_db::{ | 6 | use ra_db::{ |
7 | salsa::{Database, Durability, SweepStrategy}, | 7 | salsa::{Database, Durability, SweepStrategy}, |
8 | CrateGraph, CrateId, FileId, RelativePathBuf, SourceDatabase, SourceDatabaseExt, SourceRoot, | 8 | CrateGraph, FileId, RelativePathBuf, SourceDatabase, SourceDatabaseExt, SourceRoot, |
9 | SourceRootId, | 9 | SourceRootId, |
10 | }; | 10 | }; |
11 | use ra_prof::{memory_usage, profile, Bytes}; | 11 | use ra_prof::{memory_usage, profile, Bytes}; |
@@ -88,10 +88,6 @@ impl AnalysisChange { | |||
88 | self.crate_graph = Some(graph); | 88 | self.crate_graph = Some(graph); |
89 | } | 89 | } |
90 | 90 | ||
91 | pub fn set_debug_crate_name(&mut self, crate_id: CrateId, name: String) { | ||
92 | self.debug_data.crate_names.insert(crate_id, name); | ||
93 | } | ||
94 | |||
95 | pub fn set_debug_root_path(&mut self, source_root_id: SourceRootId, path: String) { | 91 | pub fn set_debug_root_path(&mut self, source_root_id: SourceRootId, path: String) { |
96 | self.debug_data.root_paths.insert(source_root_id, path); | 92 | self.debug_data.root_paths.insert(source_root_id, path); |
97 | } | 93 | } |
diff --git a/crates/ra_ide_db/src/lib.rs b/crates/ra_ide_db/src/lib.rs index 79f48c9e3..a105c7556 100644 --- a/crates/ra_ide_db/src/lib.rs +++ b/crates/ra_ide_db/src/lib.rs | |||
@@ -131,12 +131,10 @@ fn line_index(db: &impl LineIndexDatabase, file_id: FileId) -> Arc<LineIndex> { | |||
131 | #[derive(Debug, Default, Clone)] | 131 | #[derive(Debug, Default, Clone)] |
132 | pub(crate) struct DebugData { | 132 | pub(crate) struct DebugData { |
133 | pub(crate) root_paths: FxHashMap<SourceRootId, String>, | 133 | pub(crate) root_paths: FxHashMap<SourceRootId, String>, |
134 | pub(crate) crate_names: FxHashMap<CrateId, String>, | ||
135 | } | 134 | } |
136 | 135 | ||
137 | impl DebugData { | 136 | impl DebugData { |
138 | pub(crate) fn merge(&mut self, other: DebugData) { | 137 | pub(crate) fn merge(&mut self, other: DebugData) { |
139 | self.root_paths.extend(other.root_paths.into_iter()); | 138 | self.root_paths.extend(other.root_paths.into_iter()); |
140 | self.crate_names.extend(other.crate_names.into_iter()); | ||
141 | } | 139 | } |
142 | } | 140 | } |
diff --git a/crates/ra_ide_db/src/symbol_index.rs b/crates/ra_ide_db/src/symbol_index.rs index e6b3126b6..884359ee3 100644 --- a/crates/ra_ide_db/src/symbol_index.rs +++ b/crates/ra_ide_db/src/symbol_index.rs | |||
@@ -163,7 +163,7 @@ pub fn index_resolve(db: &RootDatabase, name_ref: &ast::NameRef) -> Vec<FileSymb | |||
163 | #[derive(Default)] | 163 | #[derive(Default)] |
164 | pub struct SymbolIndex { | 164 | pub struct SymbolIndex { |
165 | symbols: Vec<FileSymbol>, | 165 | symbols: Vec<FileSymbol>, |
166 | map: fst::Map, | 166 | map: fst::Map<Vec<u8>>, |
167 | } | 167 | } |
168 | 168 | ||
169 | impl fmt::Debug for SymbolIndex { | 169 | impl fmt::Debug for SymbolIndex { |
@@ -221,7 +221,7 @@ impl SymbolIndex { | |||
221 | builder.insert(key, value).unwrap(); | 221 | builder.insert(key, value).unwrap(); |
222 | } | 222 | } |
223 | 223 | ||
224 | let map = fst::Map::from_bytes(builder.into_inner().unwrap()).unwrap(); | 224 | let map = fst::Map::new(builder.into_inner().unwrap()).unwrap(); |
225 | SymbolIndex { symbols, map } | 225 | SymbolIndex { symbols, map } |
226 | } | 226 | } |
227 | 227 | ||