Skip to content

Commit

Permalink
zig fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
karlseguin committed Sep 11, 2024
1 parent 07473a3 commit 6a4772f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
11 changes: 4 additions & 7 deletions src/json.zig
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ pub const Json = struct {
self.writeNull(key);
return;
},
.@"null" => {
.null => {
self.writeNull(key);
return;
},
Expand All @@ -189,7 +189,7 @@ pub const Json = struct {
self.writeNull(key);
return;
},
.@"null" => {
.null => {
self.writeNull(key);
return;
},
Expand All @@ -214,7 +214,7 @@ pub const Json = struct {
self.writeNull(key);
return;
},
.@"null" => {
.null => {
self.writeNull(key);
return;
},
Expand Down Expand Up @@ -818,7 +818,6 @@ test "json: src doesn't fit" {
try expectLog(&json, null);
}


test "json: tabs" {
const p = try Pool.init(t.allocator, .{ .pool_size = 1, .encoding = .json, .large_buffer_count = 1, .large_buffer_size = 20, .buffer_size = 10 });
defer p.deinit();
Expand All @@ -827,7 +826,7 @@ test "json: tabs" {
defer json.deinit(t.allocator);

json.string("key1", "key_with_tab\t");
try expectLog(&json, "\"key1\":\"key_with_tab\\t\"");
try expectLog(&json, "\"key1\":\"key_with_tab\\t\"");
}

test "json: fmt" {
Expand Down Expand Up @@ -887,5 +886,3 @@ fn expectFmt(json: *Json, comptime fmt: []const u8, args: anytype) !void {
const expected = try std.fmt.bufPrint(&buf, "{{\"@ts\":9999999999999," ++ fmt ++ "}}\n", args);
try t.expectString(expected, out.items);
}


6 changes: 3 additions & 3 deletions src/logfmt.zig
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ pub const LogFmt = struct {
self.writeNull(key);
return;
},
.@"null" => {
.null => {
self.writeNull(key);
return;
},
Expand All @@ -195,7 +195,7 @@ pub const LogFmt = struct {
self.writeNull(key);
return;
},
.@"null" => {
.null => {
self.writeNull(key);
return;
},
Expand All @@ -220,7 +220,7 @@ pub const LogFmt = struct {
self.writeNull(key);
return;
},
.@"null" => {
.null => {
self.writeNull(key);
return;
},
Expand Down

0 comments on commit 6a4772f

Please sign in to comment.