| ... | @@ -276,7 +276,7 @@ pub fn format( | ... | @@ -276,7 +276,7 @@ pub fn format( |
| 276 | pub fn formatType( | 276 | pub fn formatType( |
| 277 | value: var, | 277 | value: var, |
| 278 | comptime fmt: []const u8, | 278 | comptime fmt: []const u8, |
| 279 | comptime options: FormatOptions, | 279 | options: FormatOptions, |
| 280 | context: var, | 280 | context: var, |
| 281 | comptime Errors: type, | 281 | comptime Errors: type, |
| 282 | output: fn (@typeOf(context), []const u8) Errors!void, | 282 | output: fn (@typeOf(context), []const u8) Errors!void, |
| ... | @@ -428,7 +428,7 @@ pub fn formatType( | ... | @@ -428,7 +428,7 @@ pub fn formatType( |
| 428 | fn formatValue( | 428 | fn formatValue( |
| 429 | value: var, | 429 | value: var, |
| 430 | comptime fmt: []const u8, | 430 | comptime fmt: []const u8, |
| 431 | comptime options: FormatOptions, | 431 | options: FormatOptions, |
| 432 | context: var, | 432 | context: var, |
| 433 | comptime Errors: type, | 433 | comptime Errors: type, |
| 434 | output: fn (@typeOf(context), []const u8) Errors!void, | 434 | output: fn (@typeOf(context), []const u8) Errors!void, |
| ... | @@ -450,7 +450,7 @@ fn formatValue( | ... | @@ -450,7 +450,7 @@ fn formatValue( |
| 450 | pub fn formatIntValue( | 450 | pub fn formatIntValue( |
| 451 | value: var, | 451 | value: var, |
| 452 | comptime fmt: []const u8, | 452 | comptime fmt: []const u8, |
| 453 | comptime options: FormatOptions, | 453 | options: FormatOptions, |
| 454 | context: var, | 454 | context: var, |
| 455 | comptime Errors: type, | 455 | comptime Errors: type, |
| 456 | output: fn (@typeOf(context), []const u8) Errors!void, | 456 | output: fn (@typeOf(context), []const u8) Errors!void, |
| ... | @@ -492,7 +492,7 @@ pub fn formatIntValue( | ... | @@ -492,7 +492,7 @@ pub fn formatIntValue( |
| 492 | fn formatFloatValue( | 492 | fn formatFloatValue( |
| 493 | value: var, | 493 | value: var, |
| 494 | comptime fmt: []const u8, | 494 | comptime fmt: []const u8, |
| 495 | comptime options: FormatOptions, | 495 | options: FormatOptions, |
| 496 | context: var, | 496 | context: var, |
| 497 | comptime Errors: type, | 497 | comptime Errors: type, |
| 498 | output: fn (@typeOf(context), []const u8) Errors!void, | 498 | output: fn (@typeOf(context), []const u8) Errors!void, |
| ... | @@ -509,7 +509,7 @@ fn formatFloatValue( | ... | @@ -509,7 +509,7 @@ fn formatFloatValue( |
| 509 | pub fn formatText( | 509 | pub fn formatText( |
| 510 | bytes: []const u8, | 510 | bytes: []const u8, |
| 511 | comptime fmt: []const u8, | 511 | comptime fmt: []const u8, |
| 512 | comptime options: FormatOptions, | 512 | options: FormatOptions, |
| 513 | context: var, | 513 | context: var, |
| 514 | comptime Errors: type, | 514 | comptime Errors: type, |
| 515 | output: fn (@typeOf(context), []const u8) Errors!void, | 515 | output: fn (@typeOf(context), []const u8) Errors!void, |
| ... | @@ -530,7 +530,7 @@ pub fn formatText( | ... | @@ -530,7 +530,7 @@ pub fn formatText( |
| 530 | | 530 | |
| 531 | pub fn formatAsciiChar( | 531 | pub fn formatAsciiChar( |
| 532 | c: u8, | 532 | c: u8, |
| 533 | comptime options: FormatOptions, | 533 | options: FormatOptions, |
| 534 | context: var, | 534 | context: var, |
| 535 | comptime Errors: type, | 535 | comptime Errors: type, |
| 536 | output: fn (@typeOf(context), []const u8) Errors!void, | 536 | output: fn (@typeOf(context), []const u8) Errors!void, |
| ... | @@ -540,7 +540,7 @@ pub fn formatAsciiChar( | ... | @@ -540,7 +540,7 @@ pub fn formatAsciiChar( |
| 540 | | 540 | |
| 541 | pub fn formatBuf( | 541 | pub fn formatBuf( |
| 542 | buf: []const u8, | 542 | buf: []const u8, |
| 543 | comptime options: FormatOptions, | 543 | options: FormatOptions, |
| 544 | context: var, | 544 | context: var, |
| 545 | comptime Errors: type, | 545 | comptime Errors: type, |
| 546 | output: fn (@typeOf(context), []const u8) Errors!void, | 546 | output: fn (@typeOf(context), []const u8) Errors!void, |
| ... | @@ -560,7 +560,7 @@ pub fn formatBuf( | ... | @@ -560,7 +560,7 @@ pub fn formatBuf( |
| 560 | // same type unambiguously. | 560 | // same type unambiguously. |
| 561 | pub fn formatFloatScientific( | 561 | pub fn formatFloatScientific( |
| 562 | value: var, | 562 | value: var, |
| 563 | comptime options: FormatOptions, | 563 | options: FormatOptions, |
| 564 | context: var, | 564 | context: var, |
| 565 | comptime Errors: type, | 565 | comptime Errors: type, |
| 566 | output: fn (@typeOf(context), []const u8) Errors!void, | 566 | output: fn (@typeOf(context), []const u8) Errors!void, |
| ... | @@ -655,7 +655,7 @@ pub fn formatFloatScientific( | ... | @@ -655,7 +655,7 @@ pub fn formatFloatScientific( |
| 655 | // By default floats are printed at full precision (no rounding). | 655 | // By default floats are printed at full precision (no rounding). |
| 656 | pub fn formatFloatDecimal( | 656 | pub fn formatFloatDecimal( |
| 657 | value: var, | 657 | value: var, |
| 658 | comptime options: FormatOptions, | 658 | options: FormatOptions, |
| 659 | context: var, | 659 | context: var, |
| 660 | comptime Errors: type, | 660 | comptime Errors: type, |
| 661 | output: fn (@typeOf(context), []const u8) Errors!void, | 661 | output: fn (@typeOf(context), []const u8) Errors!void, |
| ... | @@ -800,7 +800,7 @@ pub fn formatFloatDecimal( | ... | @@ -800,7 +800,7 @@ pub fn formatFloatDecimal( |
| 800 | | 800 | |
| 801 | pub fn formatBytes( | 801 | pub fn formatBytes( |
| 802 | value: var, | 802 | value: var, |
| 803 | comptime options: FormatOptions, | 803 | options: FormatOptions, |
| 804 | comptime radix: usize, | 804 | comptime radix: usize, |
| 805 | context: var, | 805 | context: var, |
| 806 | comptime Errors: type, | 806 | comptime Errors: type, |
| ... | @@ -842,7 +842,7 @@ pub fn formatInt( | ... | @@ -842,7 +842,7 @@ pub fn formatInt( |
| 842 | value: var, | 842 | value: var, |
| 843 | base: u8, | 843 | base: u8, |
| 844 | uppercase: bool, | 844 | uppercase: bool, |
| 845 | comptime options: FormatOptions, | 845 | options: FormatOptions, |
| 846 | context: var, | 846 | context: var, |
| 847 | comptime Errors: type, | 847 | comptime Errors: type, |
| 848 | output: fn (@typeOf(context), []const u8) Errors!void, | 848 | output: fn (@typeOf(context), []const u8) Errors!void, |
| ... | @@ -864,7 +864,7 @@ fn formatIntSigned( | ... | @@ -864,7 +864,7 @@ fn formatIntSigned( |
| 864 | value: var, | 864 | value: var, |
| 865 | base: u8, | 865 | base: u8, |
| 866 | uppercase: bool, | 866 | uppercase: bool, |
| 867 | comptime options: FormatOptions, | 867 | options: FormatOptions, |
| 868 | context: var, | 868 | context: var, |
| 869 | comptime Errors: type, | 869 | comptime Errors: type, |
| 870 | output: fn (@typeOf(context), []const u8) Errors!void, | 870 | output: fn (@typeOf(context), []const u8) Errors!void, |
| ... | @@ -895,7 +895,7 @@ fn formatIntUnsigned( | ... | @@ -895,7 +895,7 @@ fn formatIntUnsigned( |
| 895 | value: var, | 895 | value: var, |
| 896 | base: u8, | 896 | base: u8, |
| 897 | uppercase: bool, | 897 | uppercase: bool, |
| 898 | comptime options: FormatOptions, | 898 | options: FormatOptions, |
| 899 | context: var, | 899 | context: var, |
| 900 | comptime Errors: type, | 900 | comptime Errors: type, |
| 901 | output: fn (@typeOf(context), []const u8) Errors!void, | 901 | output: fn (@typeOf(context), []const u8) Errors!void, |
| ... | @@ -936,7 +936,7 @@ fn formatIntUnsigned( | ... | @@ -936,7 +936,7 @@ fn formatIntUnsigned( |
| 936 | } | 936 | } |
| 937 | } | 937 | } |
| 938 | | 938 | |
| 939 | pub fn formatIntBuf(out_buf: []u8, value: var, base: u8, uppercase: bool, comptime options: FormatOptions) usize { | 939 | pub fn formatIntBuf(out_buf: []u8, value: var, base: u8, uppercase: bool, options: FormatOptions) usize { |
| 940 | var context = FormatIntBuf{ | 940 | var context = FormatIntBuf{ |
| 941 | .out_buf = out_buf, | 941 | .out_buf = out_buf, |
| 942 | .index = 0, | 942 | .index = 0, |
| ... | @@ -1099,7 +1099,7 @@ test "bufPrintInt" { | ... | @@ -1099,7 +1099,7 @@ test "bufPrintInt" { |
| 1099 | testing.expect(mem.eql(u8, bufPrintIntToSlice(buf, i32(-42), 10, false, FormatOptions{ .width = 3 }), "-42")); | 1099 | testing.expect(mem.eql(u8, bufPrintIntToSlice(buf, i32(-42), 10, false, FormatOptions{ .width = 3 }), "-42")); |
| 1100 | } | 1100 | } |
| 1101 | | 1101 | |
| 1102 | fn bufPrintIntToSlice(buf: []u8, value: var, base: u8, uppercase: bool, comptime options: FormatOptions) []u8 { | 1102 | fn bufPrintIntToSlice(buf: []u8, value: var, base: u8, uppercase: bool, options: FormatOptions) []u8 { |
| 1103 | return buf[0..formatIntBuf(buf, value, base, uppercase, options)]; | 1103 | return buf[0..formatIntBuf(buf, value, base, uppercase, options)]; |
| 1104 | } | 1104 | } |
| 1105 | | 1105 | |
| ... | @@ -1339,7 +1339,7 @@ test "custom" { | ... | @@ -1339,7 +1339,7 @@ test "custom" { |
| 1339 | pub fn format( | 1339 | pub fn format( |
| 1340 | self: SelfType, | 1340 | self: SelfType, |
| 1341 | comptime fmt: []const u8, | 1341 | comptime fmt: []const u8, |
| 1342 | comptime options: FormatOptions, | 1342 | options: FormatOptions, |
| 1343 | context: var, | 1343 | context: var, |
| 1344 | comptime Errors: type, | 1344 | comptime Errors: type, |
| 1345 | output: fn (@typeOf(context), []const u8) Errors!void, | 1345 | output: fn (@typeOf(context), []const u8) Errors!void, |
| ... | @@ -1545,7 +1545,7 @@ test "formatType max_depth" { | ... | @@ -1545,7 +1545,7 @@ test "formatType max_depth" { |
| 1545 | pub fn format( | 1545 | pub fn format( |
| 1546 | self: SelfType, | 1546 | self: SelfType, |
| 1547 | comptime fmt: []const u8, | 1547 | comptime fmt: []const u8, |
| 1548 | comptime options: FormatOptions, | 1548 | options: FormatOptions, |
| 1549 | context: var, | 1549 | context: var, |
| 1550 | comptime Errors: type, | 1550 | comptime Errors: type, |
| 1551 | output: fn (@typeOf(context), []const u8) Errors!void, | 1551 | output: fn (@typeOf(context), []const u8) Errors!void, |