-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(bitfield): don't have
fmt::alt
control struct formatting (#292)
For `fmt::UpperHex`, `fmt::LowerHex`, and `fmt::Binary`, the "alt mode" format controls whether or not a leading `0x` or `0b` prefix is emitted. However, for the implementations of those traits on generated bitfield types, it will also effect the formatting behavior of `fmt::DebugTuple` (enabling multi-line format), as the generated format impls currently use `DebugTuple`. This commit removes the use of `DebugTuple`, and changes the types to just generate their own tuple-struct-like formatting. This way, we won't output a multiline format for a bitfield type just because the user wanted a leading `0b` prefix or `0x` prefix.
- Loading branch information
Showing
2 changed files
with
39 additions
and
14 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