mirror of
https://codeberg.org/kaasboteram/zig-iterating.git
synced 2026-02-18 21:17:04 +01:00
Add size hint for Chain
This commit is contained in:
parent
39b27061e0
commit
0928cb3f98
1 changed files with 4 additions and 0 deletions
|
|
@ -320,6 +320,10 @@ pub const adapters = struct {
|
||||||
pub fn next(self: *Self) ?Item {
|
pub fn next(self: *Self) ?Item {
|
||||||
return if (self.first.next()) |x| x else self.second.next();
|
return if (self.first.next()) |x| x else self.second.next();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn sizeHint(self: *const Self) usize {
|
||||||
|
return self.first.sizeHint() + self.second.sizeHint();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue