condense method signature

pull/1/head
Meghan Denny 2021-08-27 01:47:58 -07:00
parent 1e8ffb6240
commit 1ebce93e65
1 changed files with 3 additions and 5 deletions

View File

@ -5,15 +5,13 @@ const Value = std.json.Value;
const base64url = std.base64.url_safe_no_pad;
const Algorithm = enum {
const Self = @This();
HS256,
HS384,
HS512,
pub fn jsonStringify(
value: @This(),
options: std.json.StringifyOptions,
writer: anytype,
) @TypeOf(writer).Error!void {
pub fn jsonStringify(value: Self, options: std.json.StringifyOptions, writer: anytype) @TypeOf(writer).Error!void {
try std.json.stringify(std.meta.tagName(value), options, writer);
}
};