From b41b38cb7f16e1a622738aff591268083dca2e39 Mon Sep 17 00:00:00 2001 From: dvermd <315743+dvermd@users.noreply.github.com> Date: Tue, 13 Oct 2020 23:01:57 +0200 Subject: [PATCH] clippy_lint: Refactor 'ref_option_ref' --- clippy_lints/src/ref_option_ref.rs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/clippy_lints/src/ref_option_ref.rs b/clippy_lints/src/ref_option_ref.rs index 3b9465ec13d7..d4b09848ab60 100644 --- a/clippy_lints/src/ref_option_ref.rs +++ b/clippy_lints/src/ref_option_ref.rs @@ -34,12 +34,6 @@ declare_lint_pass!(RefOptionRef => [REF_OPTION_REF]); impl<'tcx> LateLintPass<'tcx> for RefOptionRef { fn check_ty(&mut self, cx: &LateContext<'tcx>, ty: &'tcx Ty<'tcx>) { - self.check_ref_option_ref(cx, ty); - } -} - -impl RefOptionRef { - fn check_ref_option_ref(&self, cx: &LateContext<'tcx>, ty: &'tcx Ty<'tcx>) { if_chain! { if let TyKind::Rptr(_, ref mut_ty) = ty.kind; if mut_ty.mutbl == Mutability::Not;