favor return over return _ (void return); newline/closing terminates

This commit is contained in:
2026-07-14 19:07:37 +02:00
parent eac5b32738
commit 471896b48a
19 changed files with 92266 additions and 94923 deletions
-3
View File
@@ -23,8 +23,6 @@ _fail_allocator mem.Allocator :: mem.Allocator {
vtable = &_fail_vtable,
}
_noop func() void {}
run func() i32 ! mem.AllocError {
values std.ArrayList(i32) = arraylist.init(mem.c_allocator)
defer arraylist.deinit(&values)
@@ -65,7 +63,6 @@ run func() i32 ! mem.AllocError {
failed_as_expected bool = false
arraylist.append(&failed, 1) catch |_| {
failed_as_expected = true
yield _noop()
}
if (failed_as_expected == false or failed.items.len != 0 or failed.capacity != 0) return 9
arraylist.deinit(&failed)