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