Take off every Zig!
while my mind is blown by the realloc return signature i wonder if it wouldn't be more readable as a function call?
fn reallocReturnFor(comptime T: type) type { const Slice = @typeInfo(T).Pointer; return Error![]align(Slice.alignment) Slice.child; } pub fn realloc(self: *Allocator, old_mem: anytype, new_n: usize) reallocReturnFor(@TypeOf(old_mem) { ... }
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
while my mind is blown by the realloc return signature i wonder if it wouldn't be more readable as a function call?