More manual clippy fixes

This commit is contained in:
Kirill Bulatov
2020-02-18 15:32:19 +02:00
parent b8ddcb0652
commit eceaf94f19
32 changed files with 141 additions and 159 deletions

View File

@@ -763,8 +763,8 @@ pub trait TypeWalk {
Self: Sized,
{
self.walk_mut_binders(
&mut |ty, binders| match ty {
&mut Ty::Bound(idx) => {
&mut |ty, binders| {
if let &mut Ty::Bound(idx) = ty {
if idx as usize >= binders && (idx as usize - binders) < substs.len() {
*ty = substs.0[idx as usize - binders].clone();
} else if idx as usize >= binders + substs.len() {
@@ -772,7 +772,6 @@ pub trait TypeWalk {
*ty = Ty::Bound(idx - substs.len() as u32);
}
}
_ => {}
},
0,
);