aboutsummaryrefslogtreecommitdiff
path: root/lib/std/child_process.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2024-02-02 14:41:35 -0700
committerAndrew Kelley <andrew@ziglang.org>2024-02-02 20:43:01 -0700
commit434a6a4f633f3f9b29bd80f4089e8f403aab4f9b (patch)
tree8ed86149c3ce71d56c02103789c4d04cc457e32f /lib/std/child_process.zig
parenta68defbc6559647d23862daa59d5c1f9a64e34e3 (diff)
downloadzig-434a6a4f633f3f9b29bd80f4089e8f403aab4f9b.tar.gz
zig-434a6a4f633f3f9b29bd80f4089e8f403aab4f9b.zip
std.process.Child: use unreachable instead of `@panic`
This is how assertions work in zig.
Diffstat (limited to 'lib/std/child_process.zig')
-rw-r--r--lib/std/child_process.zig4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/std/child_process.zig b/lib/std/child_process.zig
index 0a0c06ff89..8b15b7d63b 100644
--- a/lib/std/child_process.zig
+++ b/lib/std/child_process.zig
@@ -298,7 +298,9 @@ pub const ChildProcess = struct {
// we could make this work with multiple allocators but YAGNI
if (stdout.allocator.ptr != stderr.allocator.ptr or
stdout.allocator.vtable != stderr.allocator.vtable)
- @panic("ChildProcess.collectOutput only supports 1 allocator");
+ {
+ unreachable; // ChildProcess.collectOutput only supports 1 allocator
+ }
var poller = std.io.poll(stdout.allocator, enum { stdout, stderr }, .{
.stdout = child.stdout.?,