aboutsummaryrefslogtreecommitdiff
path: root/src/string_mutable.zig
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-01-03 18:53:40 -0800
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-01-03 18:53:40 -0800
commitc99059db9fc66ebfade91f00d11030570be44f5c (patch)
tree78f9494f275b504f679e0dcd4fc7f18fa44991c9 /src/string_mutable.zig
parent237bcdf99f5c8b2431e89bc9fa6300a7d256e7eb (diff)
downloadbun-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.zig9
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;
}