Skip to content

Commit

Permalink
std.mem.Allocator.construct: improve formatting;
Browse files Browse the repository at this point in the history
  • Loading branch information
kristopher tate committed Jun 20, 2018
1 parent 4b46af4 commit 6bd8610
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions std/mem.zig
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ pub const Allocator = struct {
/// Guaranteed: `old_mem.len` is the same as what was returned from `allocFn` or `reallocFn`
freeFn: fn (self: *Allocator, old_mem: []u8) void,

/// Call destroy with the result
/// Call `destroy` with the result
pub fn create(self: *Allocator, init: var) Error!*@typeOf(init) {
const T = @typeOf(init);
if (@sizeOf(T) == 0) return &{};
Expand All @@ -41,8 +41,8 @@ pub const Allocator = struct {
return ptr;
}

/// Alias of create
/// Call destroy with the result
/// Alias of `create`
/// Call `destroy` with the result
pub fn construct(self: *Allocator, init: var) Error!*@typeOf(init) {
return self.create(init);
}
Expand Down

0 comments on commit 6bd8610

Please sign in to comment.