diff options
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..]); } } |