aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2019-03-05 14:11:43 +0000
committerbors[bot] <bors[bot]@users.noreply.github.com>2019-03-05 14:11:43 +0000
commit738f2c6fc356a213c21e3bcb79dcac281861cfcb (patch)
treeb4b9d1620a4b51439b5f4ae9f3da77ea8389d956
parent4fb4b59f89dd14b64ed608dbc891fe3ee7b5b69d (diff)
parentd1c982d3c7796e1676a2cbec6eda5c3a80fd56f9 (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.rs9
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
29use fst::{self, Streamer}; 30use 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)]
117pub(crate) struct SymbolIndex { 118pub(crate) struct SymbolIndex {
118 symbols: Vec<FileSymbol>, 119 symbols: Vec<FileSymbol>,
119 map: fst::Map, 120 map: fst::Map,
120} 121}
121 122
123impl 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
122impl PartialEq for SymbolIndex { 129impl 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