Skip to content

Commit 0dc1742

Browse files
committed
Remove needless alloc
1 parent e4927d5 commit 0dc1742

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/project_model/src/sysroot.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ impl Sysroot {
3737
pub fn public_deps(&self) -> impl Iterator<Item = (&'static str, SysrootCrate)> + '_ {
3838
// core is added as a dependency before std in order to
3939
// 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)?)))
4141
}
4242

4343
pub fn proc_macro(&self) -> Option<SysrootCrate> {

0 commit comments

Comments
 (0)