Skip to content

Commit

Permalink
Fixed last commit compiler error
Browse files Browse the repository at this point in the history
Hejsil committed Jul 4, 2018

Verified

This commit was signed with the committer’s verified signature.
nwsharp Nathan Sharp
1 parent 4f32b86 commit 28821b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion std/mem.zig
Original file line number Diff line number Diff line change
@@ -34,7 +34,7 @@ pub const Allocator = struct {
/// Call `destroy` with the result
pub fn create(self: *Allocator, init: var) Error!*@typeOf(init) {
const T = @typeOf(init);
if (@sizeOf(T) == 0) return &T{};
if (@sizeOf(T) == 0) return &(T{});
const slice = try self.alloc(T, 1);
const ptr = &slice[0];
ptr.* = init;

0 comments on commit 28821b5

Please sign in to comment.