Skip to content

Commit 3c48192

Browse files
committed
PR Followups
1 parent b289a63 commit 3c48192

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clippy_lints/src/needless_ok.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ declare_lint_pass!(NeedlessOk => [IF_LET_SOME_RESULT, WHILE_LET_SOME_RESULT]);
6969
impl<'tcx> LateLintPass<'tcx> for NeedlessOk {
7070
fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) {
7171
if_chain! { // IF_LET_SOME_RESULT check
72-
if let ExprKind::Match(op, body, MatchSource::IfLetDesugar { .. }) = expr.kind; // test if expr is if let
72+
if let ExprKind::Match(op, body, MatchSource::IfLetDesugar { .. }) = expr.kind; // test if expr is `if let`
7373
if let ExprKind::MethodCall(_, ok_span, result_types, _) = op.kind;
7474
if let PatKind::TupleStruct(QPath::Resolved(_, x), y, _) = body[0].pat.kind; // get operation
7575
if method_chain_args(op, &["ok"]).is_some(); // test to see if using ok() methoduse std::marker::Sized;

0 commit comments

Comments
 (0)