Minor cleanup of implicit_return
This commit is contained in:
parent
ef9ad80617
commit
3d793f3111
|
@ -70,6 +70,7 @@ fn lint_break(cx: &LateContext<'_>, break_span: Span, expr_span: Span) {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Clone, Copy, PartialEq, Eq)]
|
||||||
enum LintLocation {
|
enum LintLocation {
|
||||||
/// The lint was applied to a parent expression.
|
/// The lint was applied to a parent expression.
|
||||||
Parent,
|
Parent,
|
||||||
|
@ -81,8 +82,8 @@ impl LintLocation {
|
||||||
if b { self } else { Self::Inner }
|
if b { self } else { Self::Inner }
|
||||||
}
|
}
|
||||||
|
|
||||||
fn is_parent(&self) -> bool {
|
fn is_parent(self) -> bool {
|
||||||
matches!(*self, Self::Parent)
|
self == Self::Parent
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue