dont produce giant debug dumps

This commit is contained in:
Aleksey Kladov 2019-03-05 17:09:48 +03:00
parent 4fb4b59f89
commit d1c982d3c7

View file

@ -24,6 +24,7 @@ use std::{
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