From 434a6a4f633f3f9b29bd80f4089e8f403aab4f9b Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Fri, 2 Feb 2024 14:41:35 -0700 Subject: [PATCH] std.process.Child: use unreachable instead of `@panic` This is how assertions work in zig. --- lib/std/child_process.zig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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.?,