Skip to content

Commit

Permalink
clippy_lint: Refactor 'ref_option_ref'
Browse files Browse the repository at this point in the history
  • Loading branch information
dvermd committed Oct 16, 2020
1 parent 4464373 commit d8ba06c
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions clippy_lints/src/ref_option_ref.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d8ba06c

Please sign in to comment.