Skip to content

Commit ad4ef19

Browse files
committed
Optimize Iter::nth by removing elem alloc
1 parent 37364da commit ad4ef19

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1267,7 +1267,7 @@ impl<'a> Iterator for Iter<'a> {
12671267
};
12681268

12691269
for _ in 0..left {
1270-
self.next();
1270+
self.borrowed_next();
12711271
}
12721272

12731273
self.next()

0 commit comments

Comments
 (0)