fix: remove workaround for Buffer.store_to_file_const bug on non-linux platforms

This bug was fixed in the previous commit.
This commit is contained in:
CJ van den Berg 2025-10-30 18:06:43 +01:00
parent ab4d1cdfa5
commit a0fa079a13
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -1374,17 +1374,7 @@ pub fn store_to_string(self: *const Self, allocator: Allocator, eol_mode: EolMod
} }
fn store_to_file_const(self: *const Self, writer: *std.Io.Writer) StoreToFileError!void { fn store_to_file_const(self: *const Self, writer: *std.Io.Writer) StoreToFileError!void {
switch (builtin.os.tag) { try self.root.store(writer, self.file_eol_mode);
.linux => {
try self.root.store(writer, self.file_eol_mode);
},
else => {
var content: std.Io.Writer.Allocating = .init(self.external_allocator);
defer content.deinit();
try self.root.store(&content.writer, self.file_eol_mode);
try writer.writeAll(content.written());
},
}
try writer.flush(); try writer.flush();
} }