mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-08-30 07:07:32 +00:00
Remove needless alloc
This commit is contained in:
parent
e4927d52e2
commit
0dc1742187
1 changed files with 1 additions and 1 deletions
|
@ -37,7 +37,7 @@ impl Sysroot {
|
||||||
pub fn public_deps(&self) -> impl Iterator<Item = (&'static str, SysrootCrate)> + '_ {
|
pub fn public_deps(&self) -> impl Iterator<Item = (&'static str, SysrootCrate)> + '_ {
|
||||||
// core is added as a dependency before std in order to
|
// core is added as a dependency before std in order to
|
||||||
// mimic rustcs dependency order
|
// 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<SysrootCrate> {
|
pub fn proc_macro(&self) -> Option<SysrootCrate> {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue