| ... | @@ -492,3 +492,8 @@ pub fn opslice(slice: anytype, index: usize) ?std.meta.Child(@TypeOf(slice)) { | ... | @@ -492,3 +492,8 @@ pub fn opslice(slice: anytype, index: usize) ?std.meta.Child(@TypeOf(slice)) { |
| 492 | if (slice.len <= index) return null; | 492 | if (slice.len <= index) return null; |
| 493 | return slice[index]; | 493 | return slice[index]; |
| 494 | } | 494 | } |
| | 495 | |
| | 496 | pub fn assertLog(ok: bool, message: string) void { |
| | 497 | if (!ok) std.log.err("assertion failure: {s}", .{message}); |
| | 498 | if (!ok) unreachable; // assertion failure |
| | 499 | } |