aboutsummaryrefslogtreecommitdiff
path: root/build.zig
diff options
context:
space:
mode:
authorIsaac Freund <ifreund@ifreund.xyz>2020-07-05 22:49:17 +0200
committerIsaac Freund <ifreund@ifreund.xyz>2020-07-05 22:49:17 +0200
commit341fe1e977cd44164f238030acc03bf7426f179d (patch)
tree5f858f4cba1d9f44fb45e7b8c34f82dbb5aae84c /build.zig
parent3752a7879bb0d34d845470bc3a9face55662292a (diff)
downloadriver-341fe1e977cd44164f238030acc03bf7426f179d.tar.gz
river-341fe1e977cd44164f238030acc03bf7426f179d.tar.xz
code: handle out of memory as well as possible
Diffstat (limited to 'build.zig')
-rw-r--r--build.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/build.zig b/build.zig
index 20e1ae2..8a9572b 100644
--- a/build.zig
+++ b/build.zig
@@ -130,7 +130,7 @@ const ScanProtocolsStep = struct {
step: std.build.Step,
fn create(builder: *std.build.Builder) *ScanProtocolsStep {
- const self = builder.allocator.create(ScanProtocolsStep) catch unreachable;
+ const self = builder.allocator.create(ScanProtocolsStep) catch @panic("out of memory");
self.* = init(builder);
return self;
}
@@ -225,7 +225,7 @@ const ScdocStep = struct {
step: std.build.Step,
fn create(builder: *std.build.Builder) *ScdocStep {
- const self = builder.allocator.create(ScdocStep) catch unreachable;
+ const self = builder.allocator.create(ScdocStep) catch @panic("out of memory");
self.* = init(builder);
return self;
}