diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2023-04-27 15:16:01 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2023-04-28 13:24:43 -0700 |
| commit | 125221cce9e985e9062f7b599431f3ff50ed79eb (patch) | |
| tree | 70e592f0f9e6304fc9bb903b22f4a64cafe5b665 /lib/std/debug.zig | |
| parent | 73d3fb9883c1d89fd1460a18f186a1737613bfbc (diff) | |
| download | zig-125221cce9e985e9062f7b599431f3ff50ed79eb.tar.gz zig-125221cce9e985e9062f7b599431f3ff50ed79eb.zip | |
std: update to use `@memcpy` directly
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 fc8b55a888..ecc1a9f0cf 100644 --- a/lib/std/debug.zig +++ b/lib/std/debug.zig @@ -309,8 +309,8 @@ pub fn panicExtra( // error being part of the @panic stack trace (but that error should // only happen rarely) const msg = std.fmt.bufPrint(buf[0..size], format, args) catch |err| switch (err) { - std.fmt.BufPrintError.NoSpaceLeft => blk: { - std.mem.copy(u8, buf[size..], trunc_msg); + error.NoSpaceLeft => blk: { + @memcpy(buf[size..], trunc_msg); break :blk &buf; }, }; |
