mirror of
https://codeberg.org/kaasboteram/zig-iterating.git
synced 2025-12-15 09:43:14 +01:00
Add @intCast in Range size hint to support signed integer types
This commit is contained in:
parent
0928cb3f98
commit
7ec0bf20dc
1 changed files with 1 additions and 1 deletions
|
|
@ -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));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue