source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "33954243bd79057c2de7338850b85983a44588021f8a5fee574a8888c6de4344"
+[[package]]
+name = "arrayvec"
+version = "0.4.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cd9fd44efafa8690358b7408d253adf110036b88f55672a933f01d616ad9b1b9"
+dependencies = [
+ "nodrop",
+]
+
[[package]]
name = "arrayvec"
version = "0.7.0"
name = "hir"
version = "0.0.0"
dependencies = [
- "arrayvec",
+ "arrayvec 0.7.0",
"base_db",
"cfg",
"either",
name = "hir_ty"
version = "0.0.0"
dependencies = [
- "arrayvec",
+ "arrayvec 0.7.0",
"base_db",
"chalk-ir",
"chalk-recursive",
"indexmap",
"itertools",
"log",
+ "num-format",
"oorandom",
"profile",
"pulldown-cmark",
"winapi",
]
+[[package]]
+name = "nodrop"
+version = "0.1.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb"
+
[[package]]
name = "notify"
version = "5.0.0-pre.9"
"winapi",
]
+[[package]]
+name = "num-format"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bafe4179722c2894288ee77a9f044f02811c86af699344c498b0840c698a2465"
+dependencies = [
+ "arrayvec 0.4.12",
+ "itoa",
+]
+
[[package]]
name = "num_cpus"
version = "1.13.0"
"lsp-types",
"mbe",
"mimalloc",
+ "num-format",
"oorandom",
"parking_lot",
"proc_macro_srv",
name = "syntax"
version = "0.0.0"
dependencies = [
- "arrayvec",
+ "arrayvec 0.7.0",
"cov-mark",
"expect-test",
"indexmap",
pulldown-cmark = { version = "0.8.0", default-features = false }
url = "2.1.1"
dot = "0.1.4"
-
+num-format = "0.4.0"
stdx = { path = "../stdx", version = "0.0.0" }
syntax = { path = "../syntax", version = "0.0.0" }
text_edit = { path = "../text_edit", version = "0.0.0" }
RootDatabase,
};
use itertools::Itertools;
+use num_format::{Buffer, Locale};
use profile::{memory_usage, Bytes};
use rustc_hash::FxHashMap;
use stdx::format_to;
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)
}
}
tracing-subscriber = { version = "0.2", default-features = false, features = ["env-filter", "registry"] }
tracing-tree = { version = "0.1.4" }
always-assert = "0.1"
-
+num-format = "0.4.0"
stdx = { path = "../stdx", version = "0.0.0" }
flycheck = { path = "../flycheck", version = "0.0.0" }
ide = { path = "../ide", version = "0.0.0" }
SemanticTokensRangeResult, SemanticTokensResult, SymbolInformation, SymbolTag,
TextDocumentIdentifier, TextDocumentPositionParams, Url, WorkspaceEdit,
};
+use num_format::{Locale, ToFormattedString};
use project_model::TargetKind;
use serde::{Deserialize, Serialize};
use serde_json::{json, to_value};
format_to!(
buf,
"Loaded {:?} packages across {} workspace{}.\n",
- snap.workspaces.iter().map(|w| w.n_packages()).sum::<usize>(),
- snap.workspaces.len(),
+ snap.workspaces.iter().map(|w| w.n_packages()).sum::<usize>().to_formatted_string(&Locale::en),
+ snap.workspaces.len().to_formatted_string(&Locale::en),
if snap.workspaces.len() == 1 { "" } else { "s" }
);
}