mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 10:28:47 +00:00
Make BoundedArray more compact, shrink Data in sql from 32 bytes to 24 bytes (#22210)
### What does this PR do? - Instead of storing `len` in `BoundedArray` as a `usize`, store it as either a `u8` or ` u16` depending on the `buffer_capacity` - Copy-paste `BoundedArray` from the standard library into Bun's codebase as it was removed in https://github.com/ziglang/zig/pull/24699/files#diff-cbd8cbbc17583cb9ea5cc0f711ce0ad447b446e62ea5ddbe29274696dce89e4f and we will probably continue using it ### How did you verify your code works? Ran `bun run zig:check` --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: taylor.fish <contact@taylor.fish>
This commit is contained in:
@@ -616,7 +616,7 @@ pub const CommandLineReporter = struct {
|
||||
file_reporter: ?FileReporter,
|
||||
line_number: u32,
|
||||
) void {
|
||||
var scopes_stack = std.BoundedArray(*jest.DescribeScope, 64).init(0) catch unreachable;
|
||||
var scopes_stack = bun.BoundedArray(*jest.DescribeScope, 64).init(0) catch unreachable;
|
||||
var parent_ = parent;
|
||||
|
||||
while (parent_) |scope| {
|
||||
|
||||
Reference in New Issue
Block a user