Avoid extra &mut in Chain::fold and try_fold
This commit is contained in:
parent
2c4cffde3b
commit
ce8abc63a7
1 changed files with 2 additions and 2 deletions
|
|
@ -84,7 +84,7 @@ where
|
|||
self.a = None;
|
||||
}
|
||||
if let Some(ref mut b) = self.b {
|
||||
acc = b.try_fold(acc, &mut f)?;
|
||||
acc = b.try_fold(acc, f)?;
|
||||
self.b = None;
|
||||
}
|
||||
Try::from_ok(acc)
|
||||
|
|
@ -98,7 +98,7 @@ where
|
|||
acc = a.fold(acc, &mut f);
|
||||
}
|
||||
if let Some(b) = self.b {
|
||||
acc = b.fold(acc, &mut f);
|
||||
acc = b.fold(acc, f);
|
||||
}
|
||||
acc
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue