]> git.lizzy.rs Git - rust.git/commitdiff
Switch back to manual deref
authorZaki Manian <zaki@manian.org>
Sun, 3 Sep 2017 03:45:40 +0000 (20:45 -0700)
committerZaki Manian <zaki@manian.org>
Sun, 3 Sep 2017 03:45:40 +0000 (20:45 -0700)
clippy_lints/src/is_unit_expr.rs

index c919c49a3266421f0a1526b47c05b141dffa31e8..ddcb5c5fc789bc7bd48baf4b69b1ea52a6314ea2 100644 (file)
@@ -78,7 +78,7 @@ fn is_unit_expr(expr: &Expr)->Option<Span>{
         ExprKind::If(_, ref then, ref else_)=>{
             let check_then = check_last_stmt_in_block(then);
             if let Some(ref else_) = *else_{
-                let check_else = is_unit_expr(*else_);
+                let check_else = is_unit_expr(else_.deref());
                 if let Some(ref expr_else) = check_else{
                     return Some(expr_else.clone());
                 }else{