mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
less verbose debug for library data
This commit is contained in:
parent
2639997973
commit
94241cec04
2 changed files with 14 additions and 1 deletions
|
@ -368,13 +368,22 @@ impl Analysis {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
|
||||||
pub struct LibraryData {
|
pub struct LibraryData {
|
||||||
root_id: SourceRootId,
|
root_id: SourceRootId,
|
||||||
root_change: RootChange,
|
root_change: RootChange,
|
||||||
symbol_index: SymbolIndex,
|
symbol_index: SymbolIndex,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl fmt::Debug for LibraryData {
|
||||||
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||||
|
f.debug_struct("LibraryData")
|
||||||
|
.field("root_id", &self.root_id)
|
||||||
|
.field("root_change", &self.root_change)
|
||||||
|
.field("n_symbols", &self.symbol_index.len())
|
||||||
|
.finish()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl LibraryData {
|
impl LibraryData {
|
||||||
pub fn prepare(
|
pub fn prepare(
|
||||||
root_id: SourceRootId,
|
root_id: SourceRootId,
|
||||||
|
|
|
@ -56,6 +56,10 @@ impl Hash for SymbolIndex {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl SymbolIndex {
|
impl SymbolIndex {
|
||||||
|
pub(crate) fn len(&self) -> usize {
|
||||||
|
self.symbols.len()
|
||||||
|
}
|
||||||
|
|
||||||
pub(crate) fn for_files(
|
pub(crate) fn for_files(
|
||||||
files: impl ParallelIterator<Item = (FileId, SourceFileNode)>,
|
files: impl ParallelIterator<Item = (FileId, SourceFileNode)>,
|
||||||
) -> SymbolIndex {
|
) -> SymbolIndex {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue