mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 22:31:43 +00:00
use num_format
This commit is contained in:
parent
d2f7e0fea4
commit
664cc8c754
5 changed files with 38 additions and 8 deletions
|
@ -10,6 +10,7 @@ use ide_db::{
|
|||
RootDatabase,
|
||||
};
|
||||
use itertools::Itertools;
|
||||
use num_format::{Buffer, Locale};
|
||||
use profile::{memory_usage, Bytes};
|
||||
use rustc_hash::FxHashMap;
|
||||
use stdx::format_to;
|
||||
|
@ -109,7 +110,8 @@ pub(crate) struct SyntaxTreeStats {
|
|||
|
||||
impl fmt::Display for SyntaxTreeStats {
|
||||
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(fmt, "{} trees, {} preserved", self.total, self.retained)
|
||||
let buf = Buffer::default().write_formatted(&self.total, &Locale::en);
|
||||
write!(fmt, "{} trees, {} preserved", buf.to_string(), self.retained)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue