mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-15 09:27:27 +00:00
we can have one less call to name.clone()
This commit is contained in:
parent
435c189c80
commit
cca0dfa79e
1 changed files with 3 additions and 2 deletions
|
@ -510,8 +510,9 @@ impl Scope {
|
|||
if let Some(prelude) = m.crate_def_map.prelude {
|
||||
let prelude_def_map = db.crate_def_map(prelude.krate);
|
||||
prelude_def_map[prelude.local_id].scope.entries().for_each(|(name, def)| {
|
||||
if !seen.contains(&(name.clone(), def)) {
|
||||
f(name.clone(), ScopeDef::PerNs(def));
|
||||
let seen_tuple = (name.clone(), def);
|
||||
if !seen.contains(&seen_tuple) {
|
||||
f(seen_tuple.0, ScopeDef::PerNs(def));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue