clippy_lint: Refactor 'ref_option_ref'
This commit is contained in:
parent
bdd76a9d1c
commit
b41b38cb7f
1 changed files with 0 additions and 6 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue