]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/clippy_lints/src/redundant_closure_call.rs
Auto merge of #88865 - guswynn:must_not_suspend, r=oli-obk
[rust.git] / src / tools / clippy / clippy_lints / src / redundant_closure_call.rs
index 7314bce83e03867d83c8e6f7e2300d9485360f60..90e3c3f4b3e98f78121f2d23f43bc4a1c89148f6 100644 (file)
@@ -51,9 +51,7 @@ fn new() -> Self {
 
 impl<'ast> ast_visit::Visitor<'ast> for ReturnVisitor {
     fn visit_expr(&mut self, ex: &'ast ast::Expr) {
-        if let ast::ExprKind::Ret(_) = ex.kind {
-            self.found_return = true;
-        } else if let ast::ExprKind::Try(_) = ex.kind {
+        if let ast::ExprKind::Ret(_) | ast::ExprKind::Try(_) = ex.kind {
             self.found_return = true;
         }