| author | |
| committer | |
| log | 4f32b86142bec636b9d6be7b72d02b836120eb35 |
| tree | 2cb368ca00434565e42839c35a946e27e2bf3a8d |
| parent | 291afcf75ab458e54a8ccd78dfd1531debfd2e40 |
1 files changed, 1 insertions(+), 1 deletions(-)
std/mem.zig+1-1| ... | ... | @@ -34,7 +34,7 @@ pub const Allocator = struct { |
| 34 | 34 | /// Call `destroy` with the result |
| 35 | 35 | pub fn create(self: *Allocator, init: var) Error!*@typeOf(init) { |
| 36 | 36 | const T = @typeOf(init); |
| 37 | if (@sizeOf(T) == 0) return &{}; | |
| 37 | if (@sizeOf(T) == 0) return &T{}; | |
| 38 | 38 | const slice = try self.alloc(T, 1); |
| 39 | 39 | const ptr = &slice[0]; |
| 40 | 40 | ptr.* = init; |