address review comments
This commit is contained in:
parent
a7aec3f207
commit
a7641f1fcc
1 changed files with 2 additions and 2 deletions
|
@ -392,7 +392,7 @@ impl UnusedParens {
|
|||
avoid_or: bool,
|
||||
avoid_mut: bool,
|
||||
) {
|
||||
use ast::{PatKind, BindingMode::ByValue, Mutability::Mut};
|
||||
use ast::{PatKind, BindingMode, Mutability};
|
||||
|
||||
if let PatKind::Paren(inner) = &value.kind {
|
||||
match inner.kind {
|
||||
|
@ -404,7 +404,7 @@ impl UnusedParens {
|
|||
// Avoid `p0 | .. | pn` if we should.
|
||||
PatKind::Or(..) if avoid_or => return,
|
||||
// Avoid `mut x` and `mut x @ p` if we should:
|
||||
PatKind::Ident(ByValue(Mut), ..) if avoid_mut => return,
|
||||
PatKind::Ident(BindingMode::ByValue(Mutability::Mut), ..) if avoid_mut => return,
|
||||
// Otherwise proceed with linting.
|
||||
_ => {}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue