aboutsummaryrefslogtreecommitdiff
path: root/std/cstr.zig
diff options
context:
space:
mode:
authorJimmi Holst Christensen <jimmiholstchristensen@gmail.com>2018-10-15 09:51:15 -0400
committerGitHub <noreply@github.com>2018-10-15 09:51:15 -0400
commit378d3e44034e817093966ea42c2940d6a0482dd8 (patch)
treefe5f454097e1627b1afc65aebfb815dd70a7576d /std/cstr.zig
parent822d4fa216ea8f598e4a9d53161800494f449a94 (diff)
downloadzig-378d3e44034e817093966ea42c2940d6a0482dd8.tar.gz
zig-378d3e44034e817093966ea42c2940d6a0482dd8.zip
Solve the return type ambiguity (#1628)
Changed container and initializer syntax * <container> { ... } -> <container> . { ... } * <exrp> { ... } -> <expr> . { ...}
Diffstat (limited to 'std/cstr.zig')
-rw-r--r--std/cstr.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/std/cstr.zig b/std/cstr.zig
index a8aaf21279..2ddf899b24 100644
--- a/std/cstr.zig
+++ b/std/cstr.zig
@@ -55,7 +55,7 @@ pub fn addNullByte(allocator: *mem.Allocator, slice: []const u8) ![]u8 {
return result;
}
-pub const NullTerminated2DArray = struct {
+pub const NullTerminated2DArray = struct.{
allocator: *mem.Allocator,
byte_count: usize,
ptr: ?[*]?[*]u8,
@@ -95,7 +95,7 @@ pub const NullTerminated2DArray = struct {
}
index_buf[i] = null;
- return NullTerminated2DArray{
+ return NullTerminated2DArray.{
.allocator = allocator,
.byte_count = byte_count,
.ptr = @ptrCast(?[*]?[*]u8, buf.ptr),