diff options
author | 2023-01-03 18:53:40 -0800 | |
---|---|---|
committer | 2023-01-03 18:53:40 -0800 | |
commit | c99059db9fc66ebfade91f00d11030570be44f5c (patch) | |
tree | 78f9494f275b504f679e0dcd4fc7f18fa44991c9 /src/string_mutable.zig | |
parent | 237bcdf99f5c8b2431e89bc9fa6300a7d256e7eb (diff) | |
download | bun-c99059db9fc66ebfade91f00d11030570be44f5c.tar.gz bun-c99059db9fc66ebfade91f00d11030570be44f5c.tar.zst bun-c99059db9fc66ebfade91f00d11030570be44f5c.zip |
Remove usages of std.x
Diffstat (limited to 'src/string_mutable.zig')
-rw-r--r-- | src/string_mutable.zig | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/string_mutable.zig b/src/string_mutable.zig index 765aa6c09..f0b64fa51 100644 --- a/src/string_mutable.zig +++ b/src/string_mutable.zig @@ -249,11 +249,14 @@ pub const MutableString = struct { return std.mem.eql(u8, self.list.items, other); } - pub fn toSocketBuffers(self: *MutableString, comptime count: usize, ranges: anytype) [count]std.x.os.Buffer { - var buffers: [count]std.x.os.Buffer = undefined; + pub fn toSocketBuffers(self: *MutableString, comptime count: usize, ranges: anytype) [count]std.os.iovec_const { + var buffers: [count]std.os.iovec_const = undefined; comptime var i: usize = 0; inline while (i < count) : (i += 1) { - buffers[i] = std.x.os.Buffer.from(self.list.items[ranges[i][0]..ranges[i][1]]); + buffers[i] = .{ + .iov_base = self.list.items[ranges[i][0]..ranges[i][1]].ptr, + .iov_len = self.list.items[ranges[i][0]..ranges[i][1]].len, + }; } return buffers; } |