-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Interpolate unnamed enum variant fields in to_string attribute (#345)
* Trim spaces at the end of format capture identifiers format! allows trailing spaces. * Interpolate unnamed enum variant fields in to_string attribute * Reject "{}" in unit-variants in enums Strings for unit-variants in enums were taken verbatim and not passed to format!() since there's no associated values that *could* be formatted. For consistency with non-unit variants these now have to use the escaped form "{{}}", otherwise an error is produced for the format string.
- Loading branch information
1 parent
410062e
commit 186d29f
Showing
3 changed files
with
93 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters