Add size hint for Chain

This commit is contained in:
Luuk Machielse 2025-12-09 19:17:43 +01:00
parent 39b27061e0
commit 0928cb3f98

View file

@ -320,6 +320,10 @@ pub const adapters = struct {
pub fn next(self: *Self) ?Item {
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();
}
};
}