]> git.lizzy.rs Git - rust.git/blobdiff - clippy_lints/src/mem_discriminant.rs
Improve `implicit_return`
[rust.git] / clippy_lints / src / mem_discriminant.rs
index 7895ba9f1e07687154eb16e46d063964a12546ef..a735c616f6e416fdeb06e0b8d6232875252b7a80 100644 (file)
@@ -34,7 +34,7 @@
 impl<'tcx> LateLintPass<'tcx> for MemDiscriminant {
     fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) {
         if_chain! {
-            if let ExprKind::Call(ref func, ref func_args) = expr.kind;
+            if let ExprKind::Call(func, func_args) = expr.kind;
             // is `mem::discriminant`
             if let ExprKind::Path(ref func_qpath) = func.kind;
             if let Some(def_id) = cx.qpath_res(func_qpath, func.hir_id).opt_def_id();
@@ -59,7 +59,7 @@ fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) {
                             let mut derefs_needed = ptr_depth;
                             let mut cur_expr = param;
                             while derefs_needed > 0  {
-                                if let ExprKind::AddrOf(BorrowKind::Ref, _, ref inner_expr) = cur_expr.kind {
+                                if let ExprKind::AddrOf(BorrowKind::Ref, _, inner_expr) = cur_expr.kind {
                                     derefs_needed -= 1;
                                     cur_expr = inner_expr;
                                 } else {