mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 18:38:55 +00:00
chore: upgrade zig to 0.12.0-dev.1828+225fe6ddb (#7671)
* chore: upgrade zig to 0.12.0-dev.1828+225fe6ddb * open as iterable * fix building identifier cache * fix windows build * fix linux build * fix linux build
This commit is contained in:
@@ -28,7 +28,7 @@ pub fn count(this: *StringBuilder, slice: string) void {
|
||||
}
|
||||
|
||||
pub fn allocate(this: *StringBuilder, allocator: Allocator) !void {
|
||||
var slice = try allocator.alloc(u8, this.cap);
|
||||
const slice = try allocator.alloc(u8, this.cap);
|
||||
this.ptr = slice.ptr;
|
||||
this.len = 0;
|
||||
}
|
||||
@@ -101,7 +101,7 @@ pub fn fmt(this: *StringBuilder, comptime str: string, args: anytype) string {
|
||||
assert(this.ptr != null); // must call allocate first
|
||||
}
|
||||
|
||||
var buf = this.ptr.?[this.len..this.cap];
|
||||
const buf = this.ptr.?[this.len..this.cap];
|
||||
const out = std.fmt.bufPrint(buf, str, args) catch unreachable;
|
||||
this.len += out.len;
|
||||
|
||||
@@ -116,7 +116,7 @@ pub fn fmtAppendCount(this: *StringBuilder, comptime str: string, args: anytype)
|
||||
assert(this.ptr != null); // must call allocate first
|
||||
}
|
||||
|
||||
var buf = this.ptr.?[this.len..this.cap];
|
||||
const buf = this.ptr.?[this.len..this.cap];
|
||||
const out = std.fmt.bufPrint(buf, str, args) catch unreachable;
|
||||
const off = this.len;
|
||||
this.len += out.len;
|
||||
|
||||
Reference in New Issue
Block a user