aboutsummaryrefslogtreecommitdiff
path: root/lib/std/fs
diff options
context:
space:
mode:
authorJonathan Marler <johnnymarler@gmail.com>2021-01-03 13:49:51 -0700
committerAndrew Kelley <andrew@ziglang.org>2021-01-07 23:49:22 -0800
commit31802c6c68a98bdbe34766d3cfdaf65b782851da (patch)
tree88ea8704da9344e62347bee9b064d4c42cfdec83 /lib/std/fs
parenta9b505fa7774e2e8451bedfa7bea27d7227572e7 (diff)
downloadzig-31802c6c68a98bdbe34766d3cfdaf65b782851da.tar.gz
zig-31802c6c68a98bdbe34766d3cfdaf65b782851da.zip
remove z/Z format specifiers
Zig's format system is flexible enough to add custom formatters. This PR removes the new z/Z format specifiers that were added for printing Zig identifiers and replaces them with custom formatters.
Diffstat (limited to 'lib/std/fs')
-rw-r--r--lib/std/fs/wasi.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/fs/wasi.zig b/lib/std/fs/wasi.zig
index 900adc5e2d..cf5431f994 100644
--- a/lib/std/fs/wasi.zig
+++ b/lib/std/fs/wasi.zig
@@ -38,7 +38,7 @@ pub const PreopenType = union(PreopenTypeTag) {
pub fn format(self: Self, comptime fmt: []const u8, options: std.fmt.FormatOptions, out_stream: anytype) !void {
try out_stream.print("PreopenType{{ ", .{});
switch (self) {
- PreopenType.Dir => |path| try out_stream.print(".Dir = '{z}'", .{path}),
+ PreopenType.Dir => |path| try out_stream.print(".Dir = '{}'", .{std.zig.fmtId(path)}),
}
return out_stream.print(" }}", .{});
}