authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-08-18 00:27:55-07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-08-18 00:27:55-07:00
logdc288f5873d80b46bbfd02e8aa6053cb8e3c01e2
treec15a5812800643edb14671c6c039ae92fade3cee
parent9bbecc6e25ba446060b4417133c9de2eacd63076
signature Signed by SSH key SHA256:4hHJbtBRU58AYXwjL7fkz2fnQHdiye8x1QpTCQ0sHNw

redo bindField to not allocate


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

ulid.zig+4-1
...@@ -53,8 +53,11 @@ pub const ULID = struct {...@@ -53,8 +53,11 @@ pub const ULID = struct {
53 return res.toOwnedSlice();53 return res.toOwnedSlice();
54 }54 }
5555
56 pub fn bindField(self: ULID) ![26]u8 {
57 return self.bytes();
58 }
59
56 pub const readField = parse;60 pub const readField = parse;
57 pub const bindField = toString;
5861
59 pub fn bytes(self: ULID) [26]u8 {62 pub fn bytes(self: ULID) [26]u8 {
60 var buf: [26]u8 = undefined;63 var buf: [26]u8 = undefined;