use matches!() macro for simple if let conditions
This commit is contained in:
parent
2c69266c06
commit
40dddd3305
15 changed files with 33 additions and 36 deletions
|
@ -868,10 +868,7 @@ impl<'a> Visitor<'a> for AstValidator<'a> {
|
|||
.emit();
|
||||
}
|
||||
|
||||
if !bounds
|
||||
.iter()
|
||||
.any(|b| if let GenericBound::Trait(..) = *b { true } else { false })
|
||||
{
|
||||
if !bounds.iter().any(|b| matches!(b, GenericBound::Trait(..))) {
|
||||
self.err_handler().span_err(ty.span, "at least one trait must be specified");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue