diff options
author | 2021-06-29 01:34:38 -0700 | |
---|---|---|
committer | 2021-06-29 01:34:38 -0700 | |
commit | ece2a3ccfd34f9d3c0bb5d8ac8b85a1dec9568f9 (patch) | |
tree | 7ba6ab6121f8ced5ca164f5b365925aa7bffd6f9 /src/string_mutable.zig | |
parent | 70126c074f8d29a5c1767e0830907e736a30febe (diff) | |
download | bun-ece2a3ccfd34f9d3c0bb5d8ac8b85a1dec9568f9.tar.gz bun-ece2a3ccfd34f9d3c0bb5d8ac8b85a1dec9568f9.tar.zst bun-ece2a3ccfd34f9d3c0bb5d8ac8b85a1dec9568f9.zip |
alright now it crashes
Former-commit-id: 26745bb5f300481fc242c8e81de6f252f698c863
Diffstat (limited to 'src/string_mutable.zig')
-rw-r--r-- | src/string_mutable.zig | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/string_mutable.zig b/src/string_mutable.zig index 249ab7394..755465b55 100644 --- a/src/string_mutable.zig +++ b/src/string_mutable.zig @@ -132,6 +132,10 @@ pub const MutableString = struct { self.list.shrinkRetainingCapacity(0); } + pub fn inflate(self: *MutableString, amount: usize) !void { + try self.list.resize(self.allocator, amount); + } + pub inline fn appendChar(self: *MutableString, char: u8) !void { try self.list.append(self.allocator, char); } |