diff options
author | Jonas Schievink <[email protected]> | 2020-12-11 17:18:27 +0000 |
---|---|---|
committer | Jonas Schievink <[email protected]> | 2020-12-11 17:18:27 +0000 |
commit | c007ac38307f4915fea367bbcaae137f97a10fbe (patch) | |
tree | a3cf9b7d88bd7d1d274b24914e71a1303f08cafb /crates | |
parent | 64752ef5e9ccfdb0b9321fe23812b9b112d8b306 (diff) |
Avoid panic when collecting memory metrics
Diffstat (limited to 'crates')
-rw-r--r-- | crates/rust-analyzer/src/lib.rs | 3 |
1 files changed, 2 insertions, 1 deletions
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) { | |||
88 | mem.push(("Remaining".into(), profile::memory_usage().allocated)); | 88 | mem.push(("Remaining".into(), profile::memory_usage().allocated)); |
89 | 89 | ||
90 | for (name, bytes) in mem { | 90 | 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); | ||
92 | } | 93 | } |
93 | } | 94 | } |