Fix even more clippy warnings
This commit is contained in:
parent
bfecb18771
commit
57c6ed0c07
53 changed files with 276 additions and 520 deletions
|
@ -92,10 +92,7 @@ impl hir::Pat<'_> {
|
|||
/// Checks if the pattern contains any patterns that bind something to
|
||||
/// an ident, e.g., `foo`, or `Foo(foo)` or `foo @ Bar(..)`.
|
||||
pub fn contains_bindings(&self) -> bool {
|
||||
self.satisfies(|p| match p.kind {
|
||||
PatKind::Binding(..) => true,
|
||||
_ => false,
|
||||
})
|
||||
self.satisfies(|p| matches!(p.kind, PatKind::Binding(..)))
|
||||
}
|
||||
|
||||
/// Checks if the pattern satisfies the given predicate on some sub-pattern.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue