We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b289a63 commit 3c48192Copy full SHA for 3c48192
clippy_lints/src/needless_ok.rs
@@ -69,7 +69,7 @@ declare_lint_pass!(NeedlessOk => [IF_LET_SOME_RESULT, WHILE_LET_SOME_RESULT]);
69
impl<'tcx> LateLintPass<'tcx> for NeedlessOk {
70
fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) {
71
if_chain! { // IF_LET_SOME_RESULT check
72
- if let ExprKind::Match(op, body, MatchSource::IfLetDesugar { .. }) = expr.kind; // test if expr is if let
+ if let ExprKind::Match(op, body, MatchSource::IfLetDesugar { .. }) = expr.kind; // test if expr is `if let`
73
if let ExprKind::MethodCall(_, ok_span, result_types, _) = op.kind;
74
if let PatKind::TupleStruct(QPath::Resolved(_, x), y, _) = body[0].pat.kind; // get operation
75
if method_chain_args(op, &["ok"]).is_some(); // test to see if using ok() methoduse std::marker::Sized;
0 commit comments