We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Skip::next
1 parent 67cdc89 commit fe6ff67Copy full SHA for fe6ff67
library/core/src/iter/adapters/skip.rs
@@ -33,7 +33,7 @@ where
33
#[inline]
34
fn next(&mut self) -> Option<I::Item> {
35
if unlikely(self.n > 0) {
36
- self.iter.nth(crate::mem::take(&mut self.n) - 1);
+ let _ = self.iter.advance_by(crate::mem::take(&mut self.n));
37
}
38
self.iter.next()
39
0 commit comments