From c007ac38307f4915fea367bbcaae137f97a10fbe Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Fri, 11 Dec 2020 18:18:27 +0100 Subject: Avoid panic when collecting memory metrics --- crates/rust-analyzer/src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'crates') diff --git a/crates/rust-analyzer/src/lib.rs b/crates/rust-analyzer/src/lib.rs index ad08f1afb..b82deaf0d 100644 --- a/crates/rust-analyzer/src/lib.rs +++ b/crates/rust-analyzer/src/lib.rs @@ -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); } } -- cgit v1.2.3