favor return over return _ (void return); newline/closing terminates
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user