1
Fork 0

address review comments

This commit is contained in:
Mazdak Farrokhzad 2019-12-19 10:42:07 +01:00
parent a7aec3f207
commit a7641f1fcc

View file

@ -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.
_ => {}
}