From c48831512b017202aa8797b72b11eb6993c9428e Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Sat, 8 Feb 2020 01:38:01 -0500 Subject: [PATCH] std lib typo fixups --- lib/std/event/loop.zig | 4 ++-- lib/std/fs.zig | 1 + lib/std/net.zig | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/std/event/loop.zig b/lib/std/event/loop.zig index 555dba3000..8000ab88c6 100644 --- a/lib/std/event/loop.zig +++ b/lib/std/event/loop.zig @@ -851,7 +851,7 @@ pub const Loop = struct { /// Performs an async `os.writev` using a separate thread. /// `fd` must block and not return EAGAIN. - pub fn writev(self: *Loop, fd: os.fd_t, iov: []const os.iovec_const) WriteError!void { + pub fn writev(self: *Loop, fd: os.fd_t, iov: []const os.iovec_const) os.WriteError!void { var req_node = Request.Node{ .data = .{ .msg = .{ @@ -872,7 +872,7 @@ pub const Loop = struct { /// Performs an async `os.pwritev` using a separate thread. /// `fd` must block and not return EAGAIN. - pub fn pwritev(self: *Loop, fd: os.fd_t, iov: []const os.iovec_const, offset: u64) WriteError!void { + pub fn pwritev(self: *Loop, fd: os.fd_t, iov: []const os.iovec_const, offset: u64) os.WriteError!void { var req_node = Request.Node{ .data = .{ .msg = .{ diff --git a/lib/std/fs.zig b/lib/std/fs.zig index fc21cbc1fc..da581c8899 100644 --- a/lib/std/fs.zig +++ b/lib/std/fs.zig @@ -706,6 +706,7 @@ pub const Dir = struct { } /// Opens a file for reading or writing, without attempting to create a new file. + /// To create a new file, see `createFile`. /// Call `File.close` to release the resource. /// Asserts that the path parameter has no null bytes. pub fn openFile(self: Dir, sub_path: []const u8, flags: File.OpenFlags) File.OpenError!File { diff --git a/lib/std/net.zig b/lib/std/net.zig index 2fce17409b..27056bf1db 100644 --- a/lib/std/net.zig +++ b/lib/std/net.zig @@ -378,8 +378,8 @@ pub fn connectUnixSocket(path: []const u8) !fs.File { ); return fs.File{ - .handle = socket, - .is_blocking = std.io.mode, + .handle = sockfd, + .io_mode = std.io.mode, }; }