Skip to content

Commit 5ee0a40

Browse files
committed
Fix dogfood errors
1 parent dd4e471 commit 5ee0a40

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

clippy_lints/src/panic_unimplemented.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ declare_lint_pass!(PanicUnimplemented => [UNIMPLEMENTED, UNREACHABLE, TODO, PANI
7373

7474
impl<'tcx> LateLintPass<'tcx> for PanicUnimplemented {
7575
fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) {
76-
if let Some(_) = match_panic_call(cx, expr) {
76+
if match_panic_call(cx, expr).is_some() {
7777
let span = get_outer_span(expr);
7878
if is_expn_of(expr.span, "unimplemented").is_some() {
7979
span_lint(

clippy_lints/src/utils/ast_utils.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,7 @@ pub fn eq_expr_opt(l: &Option<P<Expr>>, r: &Option<P<Expr>>) -> bool {
110110
pub fn eq_struct_rest(l: &StructRest, r: &StructRest) -> bool {
111111
match (l, r) {
112112
(StructRest::Base(lb), StructRest::Base(rb)) => eq_expr(lb, rb),
113-
(StructRest::Rest(_), StructRest::Rest(_)) => true,
114-
(StructRest::None, StructRest::None) => true,
113+
(StructRest::Rest(_), StructRest::Rest(_)) | (StructRest::None, StructRest::None) => true,
115114
_ => false,
116115
}
117116
}

0 commit comments

Comments
 (0)