aboutsummaryrefslogtreecommitdiff
path: root/src/string_mutable.zig
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <jarred@jarredsumner.com> 2021-05-09 18:57:48 -0700
committerGravatar Jarred Sumner <jarred@jarredsumner.com> 2021-05-09 18:57:48 -0700
commit166c353ddbbd943d1bb49ad7e017a058b8f309ea (patch)
treeab0c159c5f8b10291cbcb7a265c127045f1f5646 /src/string_mutable.zig
parentae90b3deea27f16c1e9d3d791f1cf21e342e45b5 (diff)
downloadbun-166c353ddbbd943d1bb49ad7e017a058b8f309ea.tar.gz
bun-166c353ddbbd943d1bb49ad7e017a058b8f309ea.tar.zst
bun-166c353ddbbd943d1bb49ad7e017a058b8f309ea.zip
1day
Former-commit-id: b7d8fe2f3501caa236aba343aefa1741613ca005
Diffstat (limited to 'src/string_mutable.zig')
-rw-r--r--src/string_mutable.zig4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/string_mutable.zig b/src/string_mutable.zig
index a5b13ca2e..610f35a0a 100644
--- a/src/string_mutable.zig
+++ b/src/string_mutable.zig
@@ -14,6 +14,10 @@ pub const MutableString = struct {
};
}
+ pub fn deinit(str: *MutableString) void {
+ str.list.deinit(str.allocator);
+ }
+
pub fn growIfNeeded(self: *MutableString, amount: usize) !void {
try self.list.ensureUnusedCapacity(self.allocator, amount);
}