forked from mirror/vulkan-zig
Replace {z} format specifiers with std.zig.fmtId
This commit is contained in:
@@ -139,13 +139,13 @@ pub const IdRenderer = struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn render(self: IdRenderer, out: anytype, id: []const u8) !void {
|
pub fn render(self: IdRenderer, out: anytype, id: []const u8) !void {
|
||||||
try out.print("{z}", .{ id });
|
try out.print("{}", .{ std.zig.fmtId(id) });
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn renderFmt(self: *IdRenderer, out: anytype, comptime fmt: []const u8, args: anytype) !void {
|
pub fn renderFmt(self: *IdRenderer, out: anytype, comptime fmt: []const u8, args: anytype) !void {
|
||||||
self.text_cache.items.len = 0;
|
self.text_cache.items.len = 0;
|
||||||
try std.fmt.format(self.text_cache.writer(), fmt, args);
|
try std.fmt.format(self.text_cache.writer(), fmt, args);
|
||||||
try out.print("{z}", .{ self.text_cache.items });
|
try out.print("{}", .{ std.zig.fmtId(self.text_cache.items) });
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn renderWithCase(self: *IdRenderer, out: anytype, case_style: CaseStyle, id: []const u8) !void {
|
pub fn renderWithCase(self: *IdRenderer, out: anytype, case_style: CaseStyle, id: []const u8) !void {
|
||||||
@@ -162,7 +162,7 @@ pub const IdRenderer = struct {
|
|||||||
.camel => try self.renderCamel(false, adjusted_id, tag),
|
.camel => try self.renderCamel(false, adjusted_id, tag),
|
||||||
}
|
}
|
||||||
|
|
||||||
try out.print("{z}", .{ self.text_cache.items });
|
try out.print("{}", .{ std.zig.fmtId(self.text_cache.items) });
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn getAuthorTag(self: IdRenderer, id: []const u8) ?[]const u8 {
|
pub fn getAuthorTag(self: IdRenderer, id: []const u8) ?[]const u8 {
|
||||||
|
|||||||
Reference in New Issue
Block a user