Commit a66bc79
committed
Auto merge of rust-lang#127946 - tgross35:fmt-builders-set-result, r=cuviper
Always set `result` during `finish()` in debug builders
Most functions for format builders set `self.result` after writing strings. This ensures that any further writing fails immediately rather than trying to write again.
A few `.finish()` methods and the `.finish_non_exhaustive` did have this same behavior, so update the remaining `.finish()` methods to make it consistent here.1 file changed
+8
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
402 | 402 | | |
403 | 403 | | |
404 | 404 | | |
| 405 | + | |
405 | 406 | | |
406 | 407 | | |
407 | 408 | | |
| |||
578 | 579 | | |
579 | 580 | | |
580 | 581 | | |
581 | | - | |
| 582 | + | |
| 583 | + | |
582 | 584 | | |
583 | 585 | | |
584 | 586 | | |
| |||
721 | 723 | | |
722 | 724 | | |
723 | 725 | | |
724 | | - | |
| 726 | + | |
| 727 | + | |
725 | 728 | | |
726 | 729 | | |
727 | 730 | | |
| |||
1002 | 1005 | | |
1003 | 1006 | | |
1004 | 1007 | | |
1005 | | - | |
| 1008 | + | |
1006 | 1009 | | |
1007 | 1010 | | |
1008 | 1011 | | |
1009 | | - | |
| 1012 | + | |
| 1013 | + | |
1010 | 1014 | | |
1011 | 1015 | | |
1012 | 1016 | | |
| |||
0 commit comments