commit b8112b3d17c678456fa19d600aeaf78c787ca8bc (tree)
parent 8bce1b6981d5ec71100823dfd135402a32d9609b
Author: Jakub Konka <kubkon@jakubkonka.com>
Date: Mon, 4 May 2020 13:35:02 +0200
Simplify File constructors
Diffstat:
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/lib/std/fs.zig b/lib/std/fs.zig
@@ -604,11 +604,7 @@ pub const Dir = struct {
const fd = try os.openatWasi(self.fd, sub_path, 0x0, fdflags, rights);
- return File{
- .handle = fd,
- .io_mode = .blocking,
- .async_block_allowed = File.async_block_allowed_no,
- };
+ return File{ .handle = fd };
}
pub const openFileC = @compileError("deprecated: renamed to openFileZ");
@@ -719,11 +715,7 @@ pub const Dir = struct {
const fd = try os.openatWasi(self.fd, sub_path, oflags, 0x0, rights);
- return File{
- .handle = fd,
- .io_mode = .blocking,
- .async_block_allowed = File.async_block_allowed_no,
- };
+ return File{ .handle = fd };
}
/// Same as `createFile` but the path parameter is null-terminated.