mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-10 07:04:22 +00:00
Merge #936
936: dont produce giant debug dumps r=matklad a=matklad Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
commit
738f2c6fc3
1 changed files with 8 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue