mirror of
https://github.com/oven-sh/bun
synced 2026-02-11 03:18:53 +00:00
Add a debug assertion
This commit is contained in:
@@ -45,6 +45,7 @@ pub const MutableString = struct {
|
||||
}
|
||||
|
||||
pub fn write(self: *MutableString, bytes: anytype) !usize {
|
||||
bun.debugAssert(bytes.len == 0 or !bun.isSliceInBuffer(bytes, self.list.allocatedSlice()));
|
||||
try self.list.appendSlice(self.allocator, bytes);
|
||||
return bytes.len;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user