diff options
Diffstat (limited to 'src/bun.js')
-rw-r--r-- | src/bun.js/api/server.zig | 6 | ||||
-rw-r--r-- | src/bun.js/webcore/streams.zig | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/bun.js/api/server.zig b/src/bun.js/api/server.zig index 3a50a472f..384db3a60 100644 --- a/src/bun.js/api/server.zig +++ b/src/bun.js/api/server.zig @@ -1449,7 +1449,7 @@ fn NewRequestContext(comptime ssl_enabled: bool, comptime debug_mode: bool, comp .sink = .{ .res = this.resp, .allocator = this.allocator, - .buffer = bun.ByteList.init(""), + .buffer = bun.ByteList{}, }, }; var signal = &response_stream.sink.signal; @@ -2291,14 +2291,14 @@ fn NewRequestContext(comptime ssl_enabled: bool, comptime debug_mode: bool, comp if (!last) { readable.ptr.Bytes.onData( .{ - .temporary = bun.ByteList.init(chunk), + .temporary = bun.ByteList.initConst(chunk), }, bun.default_allocator, ); } else { readable.ptr.Bytes.onData( .{ - .temporary_and_done = bun.ByteList.init(chunk), + .temporary_and_done = bun.ByteList.initConst(chunk), }, bun.default_allocator, ); diff --git a/src/bun.js/webcore/streams.zig b/src/bun.js/webcore/streams.zig index 6428fb566..f4f4ffb7c 100644 --- a/src/bun.js/webcore/streams.zig +++ b/src/bun.js/webcore/streams.zig @@ -2058,10 +2058,10 @@ pub fn NewJSSink(comptime SinkType: type, comptime name_: []const u8) type { } if (str.is16Bit()) { - return this.sink.writeUTF16(.{ .temporary = bun.ByteList.init(std.mem.sliceAsBytes(str.utf16SliceAligned())) }).toJS(globalThis); + return this.sink.writeUTF16(.{ .temporary = bun.ByteList.initConst(std.mem.sliceAsBytes(str.utf16SliceAligned())) }).toJS(globalThis); } - return this.sink.writeLatin1(.{ .temporary = bun.ByteList.init(str.slice()) }).toJS(globalThis); + return this.sink.writeLatin1(.{ .temporary = bun.ByteList.initConst(str.slice()) }).toJS(globalThis); } pub fn writeUTF8(globalThis: *JSGlobalObject, callframe: *JSC.CallFrame) callconv(.C) JSValue { |