diff --git a/base32.zig b/base32.zig index 16080c6aed19450b2ffde09f023f51aff445c423..fa4b77dc41e5aecfd7b5b6eccf9d32d8bd513cb1 100644 --- a/base32.zig +++ b/base32.zig @@ -6,7 +6,7 @@ const range = @import("range").range; const alphabet = "0123456789ABCDEFGHJKMNPQRSTVWXYZ"; -pub fn decode(alloc: *std.mem.Allocator, input: string) ![]const u5 { +pub fn decode(alloc: std.mem.Allocator, input: string) ![]const u5 { const list = &std.ArrayList(u5).init(alloc); defer list.deinit(); diff --git a/ulid.zig b/ulid.zig index a89333d42038102fc1d71df2252a21edcf42a466..f97eedd518fc1044b04c88f5c27c5fc64d9aa792 100644 --- a/ulid.zig +++ b/ulid.zig @@ -36,7 +36,7 @@ pub const ULID = struct { pub const BaseType = string; - pub fn parse(alloc: *std.mem.Allocator, value: BaseType) !ULID { + pub fn parse(alloc: std.mem.Allocator, value: BaseType) !ULID { if (value.len != 26) return error.Ulid; return ULID{ .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 { }; } - pub fn toString(self: ULID, alloc: *std.mem.Allocator) !BaseType { + pub fn toString(self: ULID, alloc: std.mem.Allocator) !BaseType { var res = try std.ArrayList(u8).initCapacity(alloc, 26); defer res.deinit(); try res.writer().print("{}", .{self});