dont produce giant debug dumps
This commit is contained in:
@@ -24,6 +24,7 @@ use std::{
|
|||||||
hash::{Hash, Hasher},
|
hash::{Hash, Hasher},
|
||||||
sync::Arc,
|
sync::Arc,
|
||||||
mem,
|
mem,
|
||||||
|
fmt,
|
||||||
};
|
};
|
||||||
|
|
||||||
use fst::{self, Streamer};
|
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)
|
crate::symbol_index::world_symbols(db, query)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Default, Debug)]
|
#[derive(Default)]
|
||||||
pub(crate) struct SymbolIndex {
|
pub(crate) struct SymbolIndex {
|
||||||
symbols: Vec<FileSymbol>,
|
symbols: Vec<FileSymbol>,
|
||||||
map: fst::Map,
|
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 {
|
impl PartialEq for SymbolIndex {
|
||||||
fn eq(&self, other: &SymbolIndex) -> bool {
|
fn eq(&self, other: &SymbolIndex) -> bool {
|
||||||
self.symbols == other.symbols
|
self.symbols == other.symbols
|
||||||
|
|||||||
Reference in New Issue
Block a user