diff --git a/Dir.zig b/Dir.zig index 02488cc236bb3b0668a095c4c25592816458e19a..5daac58151cc9569be50800cba8da1c17c100789 100644 --- a/Dir.zig +++ b/Dir.zig @@ -10,6 +10,7 @@ const os = builtin.target.os.tag; fd: nfs.Handle, +// Resource allocation may fail; resource deallocation must succeed. pub fn close(self: Dir) void { if (os == .linux) sys_linux.close(@intFromEnum(self.fd)) catch {}; diff --git a/File.zig b/File.zig index 7447115f600d4b810507acce4b0e5b563a4d64d2..ac7312e35fecde10958220dc60bfd1ae63ba8787 100644 --- a/File.zig +++ b/File.zig @@ -12,6 +12,7 @@ const os = builtin.target.os.tag; fd: nfs.Handle, +// Resource allocation may fail; resource deallocation must succeed. pub fn close(self: File) void { if (os == .linux) sys_linux.close(@intFromEnum(self.fd)) catch {};