mirror of
https://github.com/oven-sh/bun
synced 2026-02-10 02:48:50 +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:
@@ -435,13 +435,7 @@ pub const String = extern struct {
|
||||
*const ZigString, *ZigString => return String{ .tag = .ZigString, .value = .{ .ZigString = value.* } },
|
||||
*const [0:0]u8 => return String{ .tag = .Empty, .value = .{ .Empty = {} } },
|
||||
String => return value,
|
||||
else => {
|
||||
if (comptime std.meta.trait.isZigString(Type)) {
|
||||
return static(value);
|
||||
}
|
||||
|
||||
@compileError("Unsupported type for String " ++ @typeName(Type));
|
||||
},
|
||||
else => return static(value),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -664,7 +658,7 @@ pub const String = extern struct {
|
||||
}
|
||||
|
||||
pub fn substring(this: String, start_index: usize) String {
|
||||
var len = this.length();
|
||||
const len = this.length();
|
||||
return this.substringWithLen(@min(len, start_index), len);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user