Skip to content

Commit c007ac3

Browse files
Avoid panic when collecting memory metrics
1 parent 64752ef commit c007ac3

File tree

1 file changed

+2
-1
lines changed
  • crates/rust-analyzer/src

1 file changed

+2
-1
lines changed

crates/rust-analyzer/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ fn print_memory_usage(mut host: AnalysisHost, vfs: Vfs) {
8888
mem.push(("Remaining".into(), profile::memory_usage().allocated));
8989

9090
for (name, bytes) in mem {
91-
eprintln!("{:>8} {}", bytes, name);
91+
// NOTE: Not a debug print, so avoid going through the `eprintln` defined above.
92+
std::eprintln!("{:>8} {}", bytes, name);
9293
}
9394
}

0 commit comments

Comments
 (0)