refactor: lots more writergate fixes - first successful build

This commit is contained in:
CJ van den Berg 2025-09-25 22:01:29 +02:00
parent 5094aa8c85
commit bf0d4402ea
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
48 changed files with 404 additions and 413 deletions

View file

@ -269,7 +269,7 @@ pub const TabBar = struct {
tp.self_pid().send(.{ "cmd", "navigate", .{ .file = buffer.get_file_path() } }) catch {};
}
pub fn write_state(self: *const Self, writer: Buffer.MetaWriter) error{OutOfMemory}!void {
pub fn write_state(self: *const Self, writer: *std.Io.Writer) error{WriteFailed}!void {
try cbor.writeArrayHeader(writer, self.tabs.len);
for (self.tabs) |tab| try cbor.writeValue(writer, ref_to_name(tab.buffer_ref));
}
@ -498,7 +498,7 @@ const Tab = struct {
return basename;
}
fn write_state(self: *const @This(), writer: Buffer.MetaWriter) error{OutOfMemory}!void {
fn write_state(self: *const @This(), writer: *std.Io.Writer) error{OutOfMemory}!void {
try cbor.writeArrayHeader(writer, 9);
try cbor.writeValue(writer, self.get_file_path());
try cbor.writeValue(writer, self.file_exists);