diff --git a/src/root.zig b/src/root.zig index ea810d0..976356e 100644 --- a/src/root.zig +++ b/src/root.zig @@ -362,6 +362,10 @@ pub fn Range(comptime T: type, end_type: RangeEndType) type { defer self.current += 1; return self.current; } + + pub fn sizeHint(self: *const Self) usize { + return self.end - self.current + @intFromBool(end_type == .inclusive); + } }; }