aboutsummaryrefslogtreecommitdiff
path: root/src/string_mutable.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/string_mutable.zig')
-rw-r--r--src/string_mutable.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/string_mutable.zig b/src/string_mutable.zig
index 2a130672a..765aa6c09 100644
--- a/src/string_mutable.zig
+++ b/src/string_mutable.zig
@@ -132,7 +132,7 @@ pub const MutableString = struct {
has_needed_gap = true;
}
- return mutable.list.toOwnedSlice(allocator);
+ return try mutable.list.toOwnedSlice(allocator);
}
return str;
@@ -198,7 +198,7 @@ pub const MutableString = struct {
}
pub fn toOwnedSlice(self: *MutableString) string {
- return self.list.toOwnedSlice(self.allocator);
+ return self.list.toOwnedSlice(self.allocator) catch @panic("TODO");
}
pub fn toOwnedSliceLeaky(self: *MutableString) []u8 {
@@ -218,7 +218,7 @@ pub const MutableString = struct {
pub fn toOwnedSliceLength(self: *MutableString, length: usize) string {
self.list.shrinkAndFree(self.allocator, length);
- return self.list.toOwnedSlice(self.allocator);
+ return self.list.toOwnedSlice(self.allocator) catch @panic("TODO");
}
// pub fn deleteAt(self: *MutableString, i: usize) {