mirror of
https://codeberg.org/kaasboteram/zig-iterating.git
synced 2026-02-19 05:27:03 +01:00
Fix SliceIter size hint implementation to account for already taken items
This commit is contained in:
parent
d91cb914bd
commit
39b27061e0
1 changed files with 1 additions and 1 deletions
|
|
@ -413,7 +413,7 @@ pub fn SliceIter(comptime T: type, comptime item_type: SliceItemType) type {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn sizeHint(self: *const Self) usize {
|
pub fn sizeHint(self: *const Self) usize {
|
||||||
return self.slice.len;
|
return self.slice.len - self.i;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue