zig-ulid icon indicating copy to clipboard operation
zig-ulid copied to clipboard

remove Allocator parameter from ULID.parse

Open lun-4 opened this issue 3 years ago • 2 comments

if we already know that the length of an ULID is always 26 characters, why would we need the allocator for decoding it?

also fixes zig-ulid for latest zig changes (as ArrayList.toOwnedSlice() can return an error now)

lun-4 avatar Dec 01 '22 22:12 lun-4

I didn't notice that ULID has custom struct binding for zig-sqlite through bindField and readField, so https://github.com/vrischmann/zig-sqlite/issues/117 is a dependency for this.

lun-4 avatar Dec 04 '22 17:12 lun-4

if you know a function is going to do _ = allocator; then you can pass undefined for that parameter if you're using this outside the binding

nektro avatar Dec 04 '22 20:12 nektro