mirror of
https://codeberg.org/kaasboteram/zig-iterating.git
synced 2025-12-15 09:43:14 +01:00
Replace all usages of iter(T).fromSliceOwned with iter(T).fromSlice
This commit is contained in:
parent
1a671a92ac
commit
617af86052
1 changed files with 3 additions and 3 deletions
|
|
@ -10,7 +10,7 @@ pub fn iter(comptime T: type) type {
|
|||
test fromSlice {
|
||||
const expectEqual = std.testing.expectEqual;
|
||||
|
||||
var it = iter(i32).fromSlice(&.{ 1, 3, 2, 4 });
|
||||
var it = iter(i32).fromSliceOwned(&.{ 1, 3, 2, 4 });
|
||||
|
||||
try expectEqual(1, it.next());
|
||||
try expectEqual(3, it.next());
|
||||
|
|
@ -188,8 +188,8 @@ pub fn Iterator(comptime Inner: type) type {
|
|||
test zip {
|
||||
const expectEqualDeep = std.testing.expectEqualDeep;
|
||||
|
||||
var it = iter(i32).fromSlice(&.{ 1, 2, 3 })
|
||||
.zip(iter(i32).fromSlice(&.{ 4, 5, 6 }));
|
||||
var it = iter(i32).fromSliceOwned(&.{ 1, 2, 3 })
|
||||
.zip(iter(i32).fromSliceOwned(&.{ 4, 5, 6 }));
|
||||
|
||||
try expectEqualDeep(.{ 1, 4 }, it.next());
|
||||
try expectEqualDeep(.{ 2, 5 }, it.next());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue