mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-22 04:34:51 +00:00
less verbose debug for library data
This commit is contained in:
parent
2639997973
commit
94241cec04
@ -368,13 +368,22 @@ impl Analysis {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct LibraryData {
|
||||
root_id: SourceRootId,
|
||||
root_change: RootChange,
|
||||
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 {
|
||||
pub fn prepare(
|
||||
root_id: SourceRootId,
|
||||
|
@ -56,6 +56,10 @@ impl Hash for SymbolIndex {
|
||||
}
|
||||
|
||||
impl SymbolIndex {
|
||||
pub(crate) fn len(&self) -> usize {
|
||||
self.symbols.len()
|
||||
}
|
||||
|
||||
pub(crate) fn for_files(
|
||||
files: impl ParallelIterator<Item = (FileId, SourceFileNode)>,
|
||||
) -> SymbolIndex {
|
||||
|
Loading…
Reference in New Issue
Block a user