authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-04-12 13:39:57 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-04-12 13:39:57 -07:00
logc4de3cf339352f0885a4a3008e5c041fd7b5a16a
treefa4e4b2ca5d440b5ddab6d01b390c1e33cef2755
parentac83e39ec5cf043e6756bf9fd9c5776fb1eb9539
signaturebadge-check Signed by SSH key SHA256:4hHJbtBRU58AYXwjL7fkz2fnQHdiye8x1QpTCQ0sHNw

the Anys can be const


2 files changed, 4 insertions(+), 4 deletions(-)

AnyReadable.zig+2-2
...@@ -10,8 +10,8 @@ state: *allowzero anyopaque,...@@ -10,8 +10,8 @@ state: *allowzero anyopaque,
1010
11pub const Error = ReadError; // std compat11pub const Error = ReadError; // std compat
12pub const ReadError = anyerror;12pub const ReadError = anyerror;
13pub usingnamespace nio.Readable(@This(), ._var);13pub usingnamespace nio.Readable(@This(), ._const);
14pub fn read(r: *AnyReadable, buffer: []u8) !usize {14pub fn read(r: AnyReadable, buffer: []u8) !usize {
15 return r.vtable.read(r.state, buffer);15 return r.vtable.read(r.state, buffer);
16}16}
17pub fn anyReadable(r: AnyReadable) AnyReadable {17pub fn anyReadable(r: AnyReadable) AnyReadable {
AnyWritable.zig+2-2
...@@ -9,8 +9,8 @@ vtable: *const struct {...@@ -9,8 +9,8 @@ vtable: *const struct {
9state: *allowzero anyopaque,9state: *allowzero anyopaque,
1010
11pub const WriteError = anyerror;11pub const WriteError = anyerror;
12pub usingnamespace nio.Writable(@This(), ._var);12pub usingnamespace nio.Writable(@This(), ._const);
13pub fn write(r: *AnyWritable, buffer: []u8) !usize {13pub fn write(r: AnyWritable, buffer: []const u8) !usize {
14 return r.vtable.write(r.state, buffer);14 return r.vtable.write(r.state, buffer);
15}15}
16pub fn anyWritable(r: AnyWritable) AnyWritable {16pub fn anyWritable(r: AnyWritable) AnyWritable {