From cf1b89b96dcf9a9820a7d8d84d5fc2aca79cf1e4 Mon Sep 17 00:00:00 2001 From: cirospaciari Date: Thu, 15 Feb 2024 18:41:04 -0300 Subject: [PATCH] opsie --- src/fd.zig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/fd.zig b/src/fd.zig index d8b92cfe68..acceaaf7e6 100644 --- a/src/fd.zig +++ b/src/fd.zig @@ -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();