fix: update Buffer.store_to_string for zig-0.15

This commit is contained in:
CJ van den Berg 2025-09-26 21:05:16 +02:00
parent 8f1375745d
commit f90d486eae
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -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 {
var s = try ArrayList(u8).initCapacity(allocator, self.root.weights_sum().len);
try self.root.store(s.writer(), eol_mode);
var s: std.Io.Writer.Allocating = try .initCapacity(allocator, self.root.weights_sum().len);
try self.root.store(&s.writer, eol_mode);
return s.toOwnedSlice();
}