diff --git a/lib/std/Io/net.zig b/lib/std/Io/net.zig index 7c5ddbde5e9a711f39d250587c1a4fa95922fd3e..4b80d35a016e94a5580d3eae95106ee62e03a396 100644 --- a/lib/std/Io/net.zig +++ b/lib/std/Io/net.zig @@ -1283,11 +1283,10 @@ pub const Stream = struct { /// This is a low-level API that calls the `Io` interface function directly. /// For a higher level API, see `reader`. pub fn read(s: *const Stream, io: Io, data: [][]u8) Reader.Error!usize { - const rc, _ = try (try io.operate(.{ .net_read = .{ + return (try (try io.operate(.{ .net_read = .{ .socket_handle = s.socket.handle, .data = data, - } })).net_read; - return rc; + } })).net_read).data_len; } /// Read with control data.