mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-02 19:53:46 +00:00
from review: code style
Co-authored-by: Ivan Tham <pickfire@riseup.net>
This commit is contained in:
parent
2c6e67105e
commit
6654a0bbdc
@ -115,8 +115,8 @@ where
|
||||
#[inline]
|
||||
#[rustc_inherit_overflow_checks]
|
||||
fn advance_by(&mut self, n: usize) -> Result<(), usize> {
|
||||
let min = crate::cmp::min(self.n, n);
|
||||
return match self.iter.advance_by(min) {
|
||||
let min = self.n.min(n);
|
||||
match self.iter.advance_by(min) {
|
||||
Ok(_) => {
|
||||
self.n -= min;
|
||||
if min < n { Err(min) } else { Ok(()) }
|
||||
@ -125,7 +125,7 @@ where
|
||||
self.n -= advanced;
|
||||
ret
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user