fix: update Buffer.store_to_string for zig-0.15
This commit is contained in:
parent
8f1375745d
commit
f90d486eae
1 changed files with 2 additions and 2 deletions
|
@ -1370,8 +1370,8 @@ pub fn refresh_from_file(self: *Self) LoadFromFileError!void {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn store_to_string(self: *const Self, allocator: Allocator, eol_mode: EolMode) ![]u8 {
|
pub fn store_to_string(self: *const Self, allocator: Allocator, eol_mode: EolMode) ![]u8 {
|
||||||
var s = try ArrayList(u8).initCapacity(allocator, self.root.weights_sum().len);
|
var s: std.Io.Writer.Allocating = try .initCapacity(allocator, self.root.weights_sum().len);
|
||||||
try self.root.store(s.writer(), eol_mode);
|
try self.root.store(&s.writer, eol_mode);
|
||||||
return s.toOwnedSlice();
|
return s.toOwnedSlice();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue