Avoid panic when collecting memory metrics

This commit is contained in:
Jonas Schievink 2020-12-11 18:18:27 +01:00
parent 64752ef5e9
commit c007ac3830

View file

@ -88,6 +88,7 @@ fn print_memory_usage(mut host: AnalysisHost, vfs: Vfs) {
mem.push(("Remaining".into(), profile::memory_usage().allocated));
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);
}
}