Use ControlFlow
results for visitors that are only looking for a single value
This commit is contained in:
parent
d2e6cf7fa7
commit
7dca61b68b
6 changed files with 59 additions and 87 deletions
|
@ -240,7 +240,7 @@ fn has_a_default_variant(item: &Annotatable) -> bool {
|
|||
if v.attrs.iter().any(|attr| attr.has_name(kw::Default)) {
|
||||
ControlFlow::Break(())
|
||||
} else {
|
||||
// no need to subrecurse.
|
||||
// no need to walk the variant, we are only looking for top level variants
|
||||
ControlFlow::Continue(())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue