authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-12-24 20:31:57 -08:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-12-24 20:31:57 -08:00
logeeb1c87f499416bd08c8ba4896f616a3cb6f7d77
tree21b6bf007d235a80af0418f937910214a8e0ce59
parent140bf8a8b9f2f66b277642f34c6573f91361957e

update for zig 0.9.0


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

base32.zig+1-1
......@@ -6,7 +6,7 @@ const range = @import("range").range;
66
77const alphabet = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
88
9pub fn decode(alloc: *std.mem.Allocator, input: string) ![]const u5 {
9pub fn decode(alloc: std.mem.Allocator, input: string) ![]const u5 {
1010 const list = &std.ArrayList(u5).init(alloc);
1111 defer list.deinit();
1212
ulid.zig+2-2
......@@ -36,7 +36,7 @@ pub const ULID = struct {
3636
3737 pub const BaseType = string;
3838
39 pub fn parse(alloc: *std.mem.Allocator, value: BaseType) !ULID {
39 pub fn parse(alloc: std.mem.Allocator, value: BaseType) !ULID {
4040 if (value.len != 26) return error.Ulid;
4141 return ULID{
4242 .timestamp = try std.math.cast(u48, try extras.sliceToInt(u50, u5, try base32.decode(alloc, value[0..10]))),
......@@ -44,7 +44,7 @@ pub const ULID = struct {
4444 };
4545 }
4646
47 pub fn toString(self: ULID, alloc: *std.mem.Allocator) !BaseType {
47 pub fn toString(self: ULID, alloc: std.mem.Allocator) !BaseType {
4848 var res = try std.ArrayList(u8).initCapacity(alloc, 26);
4949 defer res.deinit();
5050 try res.writer().print("{}", .{self});