Rollup merge of #105050 - WaffleLapkin:uselessrefign, r=jyn514
Remove useless borrows and derefs They are nothing more than noise. <sub>These are not all of them, but my clippy started crashing (stack overflow), so rip :(</sub>
This commit is contained in:
@@ -1179,7 +1179,7 @@ impl Expr {
|
||||
pub fn peel_parens(&self) -> &Expr {
|
||||
let mut expr = self;
|
||||
while let ExprKind::Paren(inner) = &expr.kind {
|
||||
expr = &inner;
|
||||
expr = inner;
|
||||
}
|
||||
expr
|
||||
}
|
||||
@@ -2029,7 +2029,7 @@ impl Ty {
|
||||
pub fn peel_refs(&self) -> &Self {
|
||||
let mut final_ty = self;
|
||||
while let TyKind::Rptr(_, MutTy { ty, .. }) = &final_ty.kind {
|
||||
final_ty = &ty;
|
||||
final_ty = ty;
|
||||
}
|
||||
final_ty
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user