Zig utility library
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add `clone` to `SliceIterator`

IamPyu 3b9932a3 2940f200

+5
+5
src/SliceIterator.zig
··· 13 13 return Self{ .slice = slice }; 14 14 } 15 15 16 + /// Return a clone of this iterator with the same index 17 + pub fn clone(self: *const Self) Self { 18 + return Self{ .slice = self.slice, .index = self.index }; 19 + } 20 + 16 21 /// Return the next value in the iterator but don't increase the index 17 22 pub fn peek(self: *const Self) ?T { 18 23 if (self.index >= self.slice.len) {