authorgravatar for kt@connectfree.co.jpkristopher tate <kt@connectfree.co.jp> 2018-06-21 01:40:25+09:00
committergravatar for kt@connectfree.co.jpkristopher tate <kt@connectfree.co.jp> 2018-06-21 01:40:25+09:00
log6bd861006377ba192d5bd108a0de1e94f32c2454
tree64320ce14b05626991440874ba6939238eb69e52
parent4b46af481086ad253d43d149d7ee54f17e6570dc

std.mem.Allocator.construct: improve formatting;


1 files changed, 3 insertions(+), 3 deletions(-)

std/mem.zig+3-3
......@@ -31,7 +31,7 @@ pub const Allocator = struct {
3131 /// Guaranteed: `old_mem.len` is the same as what was returned from `allocFn` or `reallocFn`
3232 freeFn: fn (self: *Allocator, old_mem: []u8) void,
3333
34 /// Call destroy with the result
34 /// Call `destroy` with the result
3535 pub fn create(self: *Allocator, init: var) Error!*@typeOf(init) {
3636 const T = @typeOf(init);
3737 if (@sizeOf(T) == 0) return &{};
......@@ -41,8 +41,8 @@ pub const Allocator = struct {
4141 return ptr;
4242 }
4343
44 /// Alias of create
45 /// Call destroy with the result
44 /// Alias of `create`
45 /// Call `destroy` with the result
4646 pub fn construct(self: *Allocator, init: var) Error!*@typeOf(init) {
4747 return self.create(init);
4848 }