| author | |
| committer | |
| log | ea811764400357a5b2e868f158c76ce08a769991 |
| tree | 5bf0bd219ab7614d06937e0d74d6750137dc4e33 |
| parent | cd255f12edeb9a396afc6a44f88e6c224a8dc8e9 |
1 files changed, 5 insertions(+), 0 deletions(-)
src/lib.zig+5| ... | ... | @@ -492,3 +492,8 @@ pub fn opslice(slice: anytype, index: usize) ?std.meta.Child(@TypeOf(slice)) { |
| 492 | 492 | if (slice.len <= index) return null; |
| 493 | 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 | } |