authorgravatar for hi@whatisaph.onewhatisaphone <hi@whatisaph.one> 2026-07-24 16:38:48-04:00
committergravatar for hi@whatisaph.onewhatisaphone <hi@whatisaph.one> 2026-07-31 16:19:58-04:00
logf6366f65bcff9405e11aeb6b876211f33c0076a4
treeb35187ef61ddc911fd37b96c55f0a40032862b2e
parent159e4397fccf89af919d351945edb09af6a73165

Simplify return type of hexEscape


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

lib/std/ascii.zig+3-3
......@@ -511,11 +511,11 @@ pub const HexEscape = struct {
511511};
512512
513513/// Replaces non-ASCII bytes with hex escapes.
514pub fn hexEscape(bytes: []const u8, case: std.fmt.Case) std.fmt.Alt(HexEscape, HexEscape.format) {
515 return .{ .data = .{ .bytes = bytes, .charset = switch (case) {
514pub fn hexEscape(bytes: []const u8, case: std.fmt.Case) HexEscape {
515 return .{ .bytes = bytes, .charset = switch (case) {
516516 .lower => HexEscape.lower_charset,
517517 .upper => HexEscape.upper_charset,
518 } } };
518 } };
519519}
520520
521521test hexEscape {