| ... | ... | @@ -17,10 +17,7 @@ pub const Allocator = struct { |
| 17 | 17 | /// Aborts the program if an allocation fails. |
| 18 | 18 | fn checkedAlloc(self: &Allocator, comptime T: type, n: usize) -> []T { |
| 19 | 19 | alloc(self, T, n) %% |err| { |
| 20 | | // TODO var args printf |
| 21 | | %%io.stderr.write("allocation failure: "); |
| 22 | | %%io.stderr.write(@errorName(err)); |
| 23 | | %%io.stderr.printf("\n"); |
| 20 | %%io.stderr.printf("allocation failure: {}\n", @errorName(err)); |
| 24 | 21 | os.abort() |
| 25 | 22 | } |
| 26 | 23 | } |