aboutsummaryrefslogtreecommitdiff
path: root/lib/std/io/fixed_buffer_stream.zig
diff options
context:
space:
mode:
Diffstat (limited to 'lib/std/io/fixed_buffer_stream.zig')
-rw-r--r--lib/std/io/fixed_buffer_stream.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/std/io/fixed_buffer_stream.zig b/lib/std/io/fixed_buffer_stream.zig
index c170dd1f74..27b978744c 100644
--- a/lib/std/io/fixed_buffer_stream.zig
+++ b/lib/std/io/fixed_buffer_stream.zig
@@ -76,7 +76,7 @@ pub fn FixedBufferStream(comptime Buffer: type) type {
}
pub fn seekTo(self: *Self, pos: u64) SeekError!void {
- self.pos = if (std.math.cast(usize, pos)) |x| std.math.min(self.buffer.len, x) else self.buffer.len;
+ self.pos = if (std.math.cast(usize, pos)) |x| @min(self.buffer.len, x) else self.buffer.len;
}
pub fn seekBy(self: *Self, amt: i64) SeekError!void {
@@ -91,7 +91,7 @@ pub fn FixedBufferStream(comptime Buffer: type) type {
} else {
const amt_usize = std.math.cast(usize, amt) orelse std.math.maxInt(usize);
const new_pos = std.math.add(usize, self.pos, amt_usize) catch std.math.maxInt(usize);
- self.pos = std.math.min(self.buffer.len, new_pos);
+ self.pos = @min(self.buffer.len, new_pos);
}
}