diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-03-05 14:11:43 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-03-05 14:11:43 +0000 |
commit | 738f2c6fc356a213c21e3bcb79dcac281861cfcb (patch) | |
tree | b4b9d1620a4b51439b5f4ae9f3da77ea8389d956 | |
parent | 4fb4b59f89dd14b64ed608dbc891fe3ee7b5b69d (diff) | |
parent | d1c982d3c7796e1676a2cbec6eda5c3a80fd56f9 (diff) |
Merge #936
936: dont produce giant debug dumps r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
-rw-r--r-- | crates/ra_ide_api/src/symbol_index.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/crates/ra_ide_api/src/symbol_index.rs b/crates/ra_ide_api/src/symbol_index.rs index 414327ac2..94fe1d6d7 100644 --- a/crates/ra_ide_api/src/symbol_index.rs +++ b/crates/ra_ide_api/src/symbol_index.rs | |||
@@ -24,6 +24,7 @@ use std::{ | |||
24 | hash::{Hash, Hasher}, | 24 | hash::{Hash, Hasher}, |
25 | sync::Arc, | 25 | sync::Arc, |
26 | mem, | 26 | mem, |
27 | fmt, | ||
27 | }; | 28 | }; |
28 | 29 | ||
29 | use fst::{self, Streamer}; | 30 | use fst::{self, Streamer}; |
@@ -113,12 +114,18 @@ pub(crate) fn index_resolve(db: &RootDatabase, name_ref: &ast::NameRef) -> Vec<F | |||
113 | crate::symbol_index::world_symbols(db, query) | 114 | crate::symbol_index::world_symbols(db, query) |
114 | } | 115 | } |
115 | 116 | ||
116 | #[derive(Default, Debug)] | 117 | #[derive(Default)] |
117 | pub(crate) struct SymbolIndex { | 118 | pub(crate) struct SymbolIndex { |
118 | symbols: Vec<FileSymbol>, | 119 | symbols: Vec<FileSymbol>, |
119 | map: fst::Map, | 120 | map: fst::Map, |
120 | } | 121 | } |
121 | 122 | ||
123 | impl fmt::Debug for SymbolIndex { | ||
124 | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { | ||
125 | f.debug_struct("SymbolIndex").field("n_symbols", &self.symbols.len()).finish() | ||
126 | } | ||
127 | } | ||
128 | |||
122 | impl PartialEq for SymbolIndex { | 129 | impl PartialEq for SymbolIndex { |
123 | fn eq(&self, other: &SymbolIndex) -> bool { | 130 | fn eq(&self, other: &SymbolIndex) -> bool { |
124 | self.symbols == other.symbols | 131 | self.symbols == other.symbols |