mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-15 14:43:58 +00:00
Avoid panic when collecting memory metrics
This commit is contained in:
parent
64752ef5e9
commit
c007ac3830
1 changed files with 2 additions and 1 deletions
|
@ -88,6 +88,7 @@ fn print_memory_usage(mut host: AnalysisHost, vfs: Vfs) {
|
||||||
mem.push(("Remaining".into(), profile::memory_usage().allocated));
|
mem.push(("Remaining".into(), profile::memory_usage().allocated));
|
||||||
|
|
||||||
for (name, bytes) in mem {
|
for (name, bytes) in mem {
|
||||||
eprintln!("{:>8} {}", bytes, name);
|
// NOTE: Not a debug print, so avoid going through the `eprintln` defined above.
|
||||||
|
std::eprintln!("{:>8} {}", bytes, name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue