Skip to content

Commit 6654a0b

Browse files
the8472pickfire
andcommitted
from review: code style
Co-authored-by: Ivan Tham <[email protected]>
1 parent 2c6e671 commit 6654a0b

File tree

1 file changed

+3
-3
lines changed
  • library/core/src/iter/adapters

1 file changed

+3
-3
lines changed

library/core/src/iter/adapters/take.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ where
115115
#[inline]
116116
#[rustc_inherit_overflow_checks]
117117
fn advance_by(&mut self, n: usize) -> Result<(), usize> {
118-
let min = crate::cmp::min(self.n, n);
119-
return match self.iter.advance_by(min) {
118+
let min = self.n.min(n);
119+
match self.iter.advance_by(min) {
120120
Ok(_) => {
121121
self.n -= min;
122122
if min < n { Err(min) } else { Ok(()) }
@@ -125,7 +125,7 @@ where
125125
self.n -= advanced;
126126
ret
127127
}
128-
};
128+
}
129129
}
130130
}
131131

0 commit comments

Comments
 (0)