condense method signature
parent
1e8ffb6240
commit
1ebce93e65
8
jwt.zig
8
jwt.zig
|
@ -5,15 +5,13 @@ const Value = std.json.Value;
|
||||||
const base64url = std.base64.url_safe_no_pad;
|
const base64url = std.base64.url_safe_no_pad;
|
||||||
|
|
||||||
const Algorithm = enum {
|
const Algorithm = enum {
|
||||||
|
const Self = @This();
|
||||||
|
|
||||||
HS256,
|
HS256,
|
||||||
HS384,
|
HS384,
|
||||||
HS512,
|
HS512,
|
||||||
|
|
||||||
pub fn jsonStringify(
|
pub fn jsonStringify(value: Self, options: std.json.StringifyOptions, writer: anytype) @TypeOf(writer).Error!void {
|
||||||
value: @This(),
|
|
||||||
options: std.json.StringifyOptions,
|
|
||||||
writer: anytype,
|
|
||||||
) @TypeOf(writer).Error!void {
|
|
||||||
try std.json.stringify(std.meta.tagName(value), options, writer);
|
try std.json.stringify(std.meta.tagName(value), options, writer);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue