| ... | @@ -827,7 +827,7 @@ fn formatSliceHexImpl(comptime case: Case) type { | ... | @@ -827,7 +827,7 @@ fn formatSliceHexImpl(comptime case: Case) type { |
| 827 | const charset = "0123456789" ++ if (case == .upper) "ABCDEF" else "abcdef"; | 827 | const charset = "0123456789" ++ if (case == .upper) "ABCDEF" else "abcdef"; |
| 828 | | 828 | |
| 829 | return struct { | 829 | return struct { |
| 830 | pub fn f( | 830 | pub fn formatSliceHexImpl( |
| 831 | bytes: []const u8, | 831 | bytes: []const u8, |
| 832 | comptime fmt: []const u8, | 832 | comptime fmt: []const u8, |
| 833 | options: std.fmt.FormatOptions, | 833 | options: std.fmt.FormatOptions, |
| ... | @@ -846,8 +846,8 @@ fn formatSliceHexImpl(comptime case: Case) type { | ... | @@ -846,8 +846,8 @@ fn formatSliceHexImpl(comptime case: Case) type { |
| 846 | }; | 846 | }; |
| 847 | } | 847 | } |
| 848 | | 848 | |
| 849 | const formatSliceHexLower = formatSliceHexImpl(.lower).f; | 849 | const formatSliceHexLower = formatSliceHexImpl(.lower).formatSliceHexImpl; |
| 850 | const formatSliceHexUpper = formatSliceHexImpl(.upper).f; | 850 | const formatSliceHexUpper = formatSliceHexImpl(.upper).formatSliceHexImpl; |
| 851 | | 851 | |
| 852 | /// Return a Formatter for a []const u8 where every byte is formatted as a pair | 852 | /// Return a Formatter for a []const u8 where every byte is formatted as a pair |
| 853 | /// of lowercase hexadecimal digits. | 853 | /// of lowercase hexadecimal digits. |
| ... | @@ -865,7 +865,7 @@ fn formatSliceEscapeImpl(comptime case: Case) type { | ... | @@ -865,7 +865,7 @@ fn formatSliceEscapeImpl(comptime case: Case) type { |
| 865 | const charset = "0123456789" ++ if (case == .upper) "ABCDEF" else "abcdef"; | 865 | const charset = "0123456789" ++ if (case == .upper) "ABCDEF" else "abcdef"; |
| 866 | | 866 | |
| 867 | return struct { | 867 | return struct { |
| 868 | pub fn f( | 868 | pub fn formatSliceEscapeImpl( |
| 869 | bytes: []const u8, | 869 | bytes: []const u8, |
| 870 | comptime fmt: []const u8, | 870 | comptime fmt: []const u8, |
| 871 | options: std.fmt.FormatOptions, | 871 | options: std.fmt.FormatOptions, |
| ... | @@ -891,8 +891,8 @@ fn formatSliceEscapeImpl(comptime case: Case) type { | ... | @@ -891,8 +891,8 @@ fn formatSliceEscapeImpl(comptime case: Case) type { |
| 891 | }; | 891 | }; |
| 892 | } | 892 | } |
| 893 | | 893 | |
| 894 | const formatSliceEscapeLower = formatSliceEscapeImpl(.lower).f; | 894 | const formatSliceEscapeLower = formatSliceEscapeImpl(.lower).formatSliceEscapeImpl; |
| 895 | const formatSliceEscapeUpper = formatSliceEscapeImpl(.upper).f; | 895 | const formatSliceEscapeUpper = formatSliceEscapeImpl(.upper).formatSliceEscapeImpl; |
| 896 | | 896 | |
| 897 | /// Return a Formatter for a []const u8 where every non-printable ASCII | 897 | /// Return a Formatter for a []const u8 where every non-printable ASCII |
| 898 | /// character is escaped as \xNN, where NN is the character in lowercase | 898 | /// character is escaped as \xNN, where NN is the character in lowercase |
| ... | @@ -910,7 +910,7 @@ pub fn fmtSliceEscapeUpper(bytes: []const u8) std.fmt.Formatter(formatSliceEscap | ... | @@ -910,7 +910,7 @@ pub fn fmtSliceEscapeUpper(bytes: []const u8) std.fmt.Formatter(formatSliceEscap |
| 910 | | 910 | |
| 911 | fn formatSizeImpl(comptime radix: comptime_int) type { | 911 | fn formatSizeImpl(comptime radix: comptime_int) type { |
| 912 | return struct { | 912 | return struct { |
| 913 | fn f( | 913 | fn formatSizeImpl( |
| 914 | value: u64, | 914 | value: u64, |
| 915 | comptime fmt: []const u8, | 915 | comptime fmt: []const u8, |
| 916 | options: FormatOptions, | 916 | options: FormatOptions, |
| ... | @@ -958,8 +958,8 @@ fn formatSizeImpl(comptime radix: comptime_int) type { | ... | @@ -958,8 +958,8 @@ fn formatSizeImpl(comptime radix: comptime_int) type { |
| 958 | }; | 958 | }; |
| 959 | } | 959 | } |
| 960 | | 960 | |
| 961 | const formatSizeDec = formatSizeImpl(1000).f; | 961 | const formatSizeDec = formatSizeImpl(1000).formatSizeImpl; |
| 962 | const formatSizeBin = formatSizeImpl(1024).f; | 962 | const formatSizeBin = formatSizeImpl(1024).formatSizeImpl; |
| 963 | | 963 | |
| 964 | /// Return a Formatter for a u64 value representing a file size. | 964 | /// Return a Formatter for a u64 value representing a file size. |
| 965 | /// This formatter represents the number as multiple of 1000 and uses the SI | 965 | /// This formatter represents the number as multiple of 1000 and uses the SI |