| ... | ... | @@ -31,7 +31,7 @@ pub const Allocator = struct { |
| 31 | 31 | /// Guaranteed: `old_mem.len` is the same as what was returned from `allocFn` or `reallocFn` |
| 32 | 32 | freeFn: fn (self: *Allocator, old_mem: []u8) void, |
| 33 | 33 | |
| 34 | | /// Call destroy with the result |
| 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 | 37 | if (@sizeOf(T) == 0) return &{}; |
| ... | ... | @@ -41,8 +41,8 @@ pub const Allocator = struct { |
| 41 | 41 | return ptr; |
| 42 | 42 | } |
| 43 | 43 | |
| 44 | | /// Alias of create |
| 45 | | /// Call destroy with the result |
| 44 | /// Alias of `create` |
| 45 | /// Call `destroy` with the result |
| 46 | 46 | pub fn construct(self: *Allocator, init: var) Error!*@typeOf(init) { |
| 47 | 47 | return self.create(init); |
| 48 | 48 | } |