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:
parent
ab4d1cdfa5
commit
a0fa079a13
1 changed files with 1 additions and 11 deletions
|
|
@ -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) {
|
|
||||||
.linux => {
|
|
||||||
try self.root.store(writer, self.file_eol_mode);
|
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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue