From 7ec0bf20dcff6325f953cd55313f710b6b739a46 Mon Sep 17 00:00:00 2001 From: Luuk Machielse Date: Tue, 9 Dec 2025 19:20:45 +0100 Subject: [PATCH] Add `@intCast` in `Range` size hint to support signed integer types --- src/root.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/root.zig b/src/root.zig index 4d87c86..09625f5 100644 --- a/src/root.zig +++ b/src/root.zig @@ -365,7 +365,7 @@ pub fn Range(comptime T: type, end_type: RangeEndType) type { } pub fn sizeHint(self: *const Self) usize { - return self.end - self.current + @intFromBool(end_type == .inclusive); + return @intCast(self.end - self.current + @intFromBool(end_type == .inclusive)); } }; }