diff options
author | 2023-02-23 23:57:19 -0800 | |
---|---|---|
committer | 2023-02-23 23:57:19 -0800 | |
commit | 3f04f8d0a653cf5decef2225c2044742b382718a (patch) | |
tree | 91eb6500834e3157ecb9ab208101aa368a1191c8 /src/string_mutable.zig | |
parent | b5bdde28ed34070cbb1d34d13f414f4c513ee40d (diff) | |
download | bun-3f04f8d0a653cf5decef2225c2044742b382718a.tar.gz bun-3f04f8d0a653cf5decef2225c2044742b382718a.tar.zst bun-3f04f8d0a653cf5decef2225c2044742b382718a.zip |
Upgrade Zig (#2151)
* fixup
* Upgrade Zig
* Remove bad assertion
* strings
* bump
* mode -> optimize
* optimize
* Linux build
* Update bindgen.zig
Diffstat (limited to 'src/string_mutable.zig')
-rw-r--r-- | src/string_mutable.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/string_mutable.zig b/src/string_mutable.zig index 0d20fed6a..d7b0cf930 100644 --- a/src/string_mutable.zig +++ b/src/string_mutable.zig @@ -63,7 +63,7 @@ pub const MutableString = struct { pub const ensureUnusedCapacity = growIfNeeded; pub fn initCopy(allocator: std.mem.Allocator, str: anytype) !MutableString { - var mutable = try MutableString.init(allocator, std.mem.len(str)); + var mutable = try MutableString.init(allocator, str.len); try mutable.copy(str); return mutable; } @@ -145,12 +145,12 @@ pub const MutableString = struct { } pub fn copy(self: *MutableString, str: anytype) !void { - try self.list.ensureTotalCapacity(self.allocator, std.mem.len(str[0..])); + try self.list.ensureTotalCapacity(self.allocator, str[0..].len); if (self.list.items.len == 0) { try self.list.insertSlice(self.allocator, 0, str); } else { - try self.list.replaceRange(self.allocator, 0, std.mem.len(str[0..]), str[0..]); + try self.list.replaceRange(self.allocator, 0, str[0..].len, str[0..]); } } |