| ... | @@ -34,7 +34,7 @@ pub const Allocator = struct { | ... | @@ -34,7 +34,7 @@ pub const Allocator = struct { |
| 34 | /// Call `destroy` with the result | 34 | /// Call `destroy` with the result |
| 35 | pub fn create(self: *Allocator, init: var) Error!*@typeOf(init) { | 35 | pub fn create(self: *Allocator, init: var) Error!*@typeOf(init) { |
| 36 | const T = @typeOf(init); | 36 | const T = @typeOf(init); |
| 37 | if (@sizeOf(T) == 0) return &T{}; | 37 | if (@sizeOf(T) == 0) return &(T{}); |
| 38 | const slice = try self.alloc(T, 1); | 38 | const slice = try self.alloc(T, 1); |
| 39 | const ptr = &slice[0]; | 39 | const ptr = &slice[0]; |
| 40 | ptr.* = init; | 40 | ptr.* = init; |