This commit is contained in:
cirospaciari
2024-02-15 18:41:04 -03:00
parent 05dc7eb2b1
commit cf1b89b96d

View File

@@ -303,10 +303,6 @@ pub const FDImpl = packed struct {
}
pub fn format(this: FDImpl, comptime fmt: []const u8, _: std.fmt.FormatOptions, writer: anytype) !void {
if (fmt.len != 0) {
@compileError("invalid format string for FDImpl.format. must be either '' or 'd'");
}
if (!this.isValid()) {
try writer.writeAll("[invalid_fd]");
return;
@@ -317,6 +313,10 @@ pub const FDImpl = packed struct {
return;
}
if (fmt.len != 0) {
@compileError("invalid format string for FDImpl.format. must be either '' or 'd'");
}
switch (env.os) {
else => {
const fd = this.system();