aboutsummaryrefslogtreecommitdiff
path: root/crates/project_model/src/sysroot.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-11-17 10:51:45 +0000
committerAleksey Kladov <[email protected]>2020-11-17 10:52:28 +0000
commit0dc1742187d36b559d5d62ada3989901fdbd074c (patch)
tree7f87a72aba2f5d9931d0bb30a7fb6aee49e45179 /crates/project_model/src/sysroot.rs
parente4927d52e296c744b2c4bf7b42a10d019b9acff7 (diff)
Remove needless alloc
Diffstat (limited to 'crates/project_model/src/sysroot.rs')
-rw-r--r--crates/project_model/src/sysroot.rs2
1 files changed, 1 insertions, 1 deletions
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 {
37 pub fn public_deps(&self) -> impl Iterator<Item = (&'static str, SysrootCrate)> + '_ { 37 pub fn public_deps(&self) -> impl Iterator<Item = (&'static str, SysrootCrate)> + '_ {
38 // core is added as a dependency before std in order to 38 // core is added as a dependency before std in order to
39 // mimic rustcs dependency order 39 // mimic rustcs dependency order
40 vec!["core", "alloc", "std"].into_iter().filter_map(move |it| Some((it, self.by_name(it)?))) 40 ["core", "alloc", "std"].iter().filter_map(move |&it| Some((it, self.by_name(it)?)))
41 } 41 }
42 42
43 pub fn proc_macro(&self) -> Option<SysrootCrate> { 43 pub fn proc_macro(&self) -> Option<SysrootCrate> {