From 3f04f8d0a653cf5decef2225c2044742b382718a Mon Sep 17 00:00:00 2001 From: Dylan Conway <35280289+dylan-conway@users.noreply.github.com> Date: Thu, 23 Feb 2023 23:57:19 -0800 Subject: Upgrade Zig (#2151) * fixup * Upgrade Zig * Remove bad assertion * strings * bump * mode -> optimize * optimize * Linux build * Update bindgen.zig --- src/string_mutable.zig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/string_mutable.zig') 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..]); } } -- cgit v1.2.3