| ... | @@ -511,11 +511,11 @@ pub const HexEscape = struct { | ... | @@ -511,11 +511,11 @@ pub const HexEscape = struct { |
| 511 | }; | 511 | }; |
| 512 | | 512 | |
| 513 | /// Replaces non-ASCII bytes with hex escapes. | 513 | /// Replaces non-ASCII bytes with hex escapes. |
| 514 | pub fn hexEscape(bytes: []const u8, case: std.fmt.Case) std.fmt.Alt(HexEscape, HexEscape.format) { | 514 | pub fn hexEscape(bytes: []const u8, case: std.fmt.Case) HexEscape { |
| 515 | return .{ .data = .{ .bytes = bytes, .charset = switch (case) { | 515 | return .{ .bytes = bytes, .charset = switch (case) { |
| 516 | .lower => HexEscape.lower_charset, | 516 | .lower => HexEscape.lower_charset, |
| 517 | .upper => HexEscape.upper_charset, | 517 | .upper => HexEscape.upper_charset, |
| 518 | } } }; | 518 | } }; |
| 519 | } | 519 | } |
| 520 | | 520 | |
| 521 | test hexEscape { | 521 | test hexEscape { |