mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 06:41:48 +00:00
Simplify
This commit is contained in:
parent
284c1741d6
commit
8ea1afce28
16 changed files with 197 additions and 197 deletions
|
@ -69,9 +69,7 @@ pub(super) fn all_super_trait_refs<T>(
|
|||
cb: impl FnMut(TraitRef) -> Option<T>,
|
||||
) -> Option<T> {
|
||||
let seen = iter::once(trait_ref.trait_id).collect();
|
||||
let mut stack = Vec::new();
|
||||
stack.push(trait_ref);
|
||||
SuperTraits { db, seen, stack }.find_map(cb)
|
||||
SuperTraits { db, seen, stack: vec![trait_ref] }.find_map(cb)
|
||||
}
|
||||
|
||||
struct SuperTraits<'a> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue