From 24ad1cce2c3cf2c0ce8288fc02c4c55529598990 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sun, 2 Feb 2020 18:54:26 +0100 Subject: Avoid premature pessimization The extra allocation for message should not matter here at all, but using a static string is just as ergonomic, if not more, and there's no reason to write deliberately slow code --- crates/ra_ide/src/change.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'crates/ra_ide/src') diff --git a/crates/ra_ide/src/change.rs b/crates/ra_ide/src/change.rs index 45a58690b..18dad2ea3 100644 --- a/crates/ra_ide/src/change.rs +++ b/crates/ra_ide/src/change.rs @@ -145,6 +145,8 @@ impl LibraryData { root_id: SourceRootId, files: Vec<(FileId, RelativePathBuf, Arc)>, ) -> LibraryData { + let _p = profile("LibraryData::prepare"); + #[cfg(not(feature = "wasm"))] let iter = files.par_iter(); #[cfg(feature = "wasm")] -- cgit v1.2.3