diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2023-06-16 13:45:33 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-16 13:45:33 -0700 |
| commit | 537104fd9d84d94abad3e36d3cd781be4397e299 (patch) | |
| tree | a77492de657f8a76c15bdeb443916490db79e1cd /lib/std/debug.zig | |
| parent | 5d9e8f27d0dc131e0b4154c5f65376f2fb9f3500 (diff) | |
| parent | 2af5bd8aa8711b2a6e60f961290372134090f235 (diff) | |
| download | zig-537104fd9d84d94abad3e36d3cd781be4397e299.tar.gz zig-537104fd9d84d94abad3e36d3cd781be4397e299.zip | |
Merge pull request #16025 from mlugg/feat/remove-std-math-minmax
Consider bounds when refining @min/@max result type; deprecate std.math.{min,max,min3,max3}
Diffstat (limited to 'lib/std/debug.zig')
| -rw-r--r-- | lib/std/debug.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/std/debug.zig b/lib/std/debug.zig index ea0d467085..3015c30bfb 100644 --- a/lib/std/debug.zig +++ b/lib/std/debug.zig @@ -198,7 +198,7 @@ pub fn captureStackTrace(first_address: ?usize, stack_trace: *std.builtin.StackT stack_trace.index = 0; return; }; - const end_index = math.min(first_index + addrs.len, n); + const end_index = @min(first_index + addrs.len, n); const slice = addr_buf[first_index..end_index]; // We use a for loop here because slice and addrs may alias. for (slice, 0..) |addr, i| { @@ -380,7 +380,7 @@ pub fn writeStackTrace( _ = allocator; if (builtin.strip_debug_info) return error.MissingDebugInfo; var frame_index: usize = 0; - var frames_left: usize = std.math.min(stack_trace.index, stack_trace.instruction_addresses.len); + var frames_left: usize = @min(stack_trace.index, stack_trace.instruction_addresses.len); while (frames_left != 0) : ({ frames_left -= 1; |
