2 ms·
To me the scope leak was annoying because how Zig does not allow shadowing, so I have to write: var it = a.getSomeIterable(); while (it.next()) |item| {
by jeltz 6y ago
To me the scope leak was annoying because how Zig does not allow shadowing, so I have to write:
var it = a.getSomeIterable();
while (it.next()) |item| {
...
}
var it2 = b.getSomeIterable();
while (it2.next()) |item| {
...
}
- Leherenn 6y agoYou can do: { var it = a.getSomeIterable(); while (it.next()) |item| { ... } } { var it = b.getSomeIterable(); while (it.next()) |item| { ... } }