mirror of
https://github.com/oven-sh/bun
synced 2026-02-11 11:29:02 +00:00
Refactor BabyList (#22502)
(For internal tracking: fixes STAB-1129, STAB-1145, STAB-1146, STAB-1150, STAB-1126, STAB-1147, STAB-1148, STAB-1149, STAB-1158) --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Jarred Sumner <jarred@jarredsumner.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
@@ -258,13 +258,6 @@ pub fn slice(self: *MutableString) []u8 {
|
||||
return self.list.items;
|
||||
}
|
||||
|
||||
/// Take ownership of the existing value without discarding excess capacity.
|
||||
pub fn move(self: *MutableString) []u8 {
|
||||
const out = self.list.items;
|
||||
self.list = .{};
|
||||
return out;
|
||||
}
|
||||
|
||||
/// Appends `0` if needed
|
||||
pub fn sliceWithSentinel(self: *MutableString) [:0]u8 {
|
||||
if (self.list.items.len > 0 and self.list.items[self.list.items.len - 1] != 0) {
|
||||
|
||||
Reference in New Issue
Block a user