From 0dc1742187d36b559d5d62ada3989901fdbd074c Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 17 Nov 2020 11:51:45 +0100 Subject: Remove needless alloc --- crates/project_model/src/sysroot.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/project_model/src/sysroot.rs b/crates/project_model/src/sysroot.rs index b0e8863f6..f0a43eaf6 100644 --- a/crates/project_model/src/sysroot.rs +++ b/crates/project_model/src/sysroot.rs @@ -37,7 +37,7 @@ impl Sysroot { pub fn public_deps(&self) -> impl Iterator + '_ { // core is added as a dependency before std in order to // mimic rustcs dependency order - vec!["core", "alloc", "std"].into_iter().filter_map(move |it| Some((it, self.by_name(it)?))) + ["core", "alloc", "std"].iter().filter_map(move |&it| Some((it, self.by_name(it)?))) } pub fn proc_macro(&self) -> Option { -- cgit v1.2.3