mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 18:38:55 +00:00
remove dead code in src/bake/DevServer/SerializedFailure.zig (#24635)
### What does this PR do? remove dead code in src/bake/DevServer/SerializedFailure.zig ### How did you verify your code works? It builds
This commit is contained in:
@@ -104,29 +104,6 @@ pub const ErrorKind = enum(u8) {
|
||||
js_aggregate,
|
||||
};
|
||||
|
||||
pub fn initFromJs(dev: *DevServer, owner: Owner, value: JSValue) !SerializedFailure {
|
||||
{
|
||||
_ = value;
|
||||
@panic("TODO");
|
||||
}
|
||||
// Avoid small re-allocations without requesting so much from the heap
|
||||
var sfb = std.heap.stackFallback(65536, dev.allocator());
|
||||
var payload = std.array_list.Managed(u8).initCapacity(sfb.get(), 65536) catch
|
||||
unreachable; // enough space
|
||||
const w = payload.writer();
|
||||
|
||||
try w.writeInt(u32, @bitCast(owner.encode()), .little);
|
||||
// try writeJsValue(value);
|
||||
|
||||
// Avoid-recloning if it is was moved to the hap
|
||||
const data = if (payload.items.ptr == &sfb.buffer)
|
||||
try dev.allocator().dupe(u8, payload.items)
|
||||
else
|
||||
payload.items;
|
||||
|
||||
return .{ .data = data };
|
||||
}
|
||||
|
||||
pub fn initFromLog(
|
||||
dev: *DevServer,
|
||||
owner: Owner,
|
||||
|
||||
Reference in New Issue
Block a user