936: dont produce giant debug dumps r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
bors[bot] 2019-03-05 14:11:43 +00:00
commit 738f2c6fc3

View File

@ -24,6 +24,7 @@
hash::{Hash, Hasher},
sync::Arc,
mem,
fmt,
};
use fst::{self, Streamer};
@ -113,12 +114,18 @@ pub(crate) fn index_resolve(db: &RootDatabase, name_ref: &ast::NameRef) -> Vec<F
crate::symbol_index::world_symbols(db, query)
}
#[derive(Default, Debug)]
#[derive(Default)]
pub(crate) struct SymbolIndex {
symbols: Vec<FileSymbol>,
map: fst::Map,
}
impl fmt::Debug for SymbolIndex {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_struct("SymbolIndex").field("n_symbols", &self.symbols.len()).finish()
}
}
impl PartialEq for SymbolIndex {
fn eq(&self, other: &SymbolIndex) -> bool {
self.symbols == other.symbols