-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce hex::display for Display’ing binary data in hex
encode method allocates a new string which is wasteful if all one wants to do is display the binary data using format! or related macro. Introduce hex::Display wrapper with hex::display as its constructor which wraps the binary data in an object that implements Display, LowerHex, UpperHex and Debug and formats the data as hex. However, as it uses buffers on stack, it performs no allocations.
- Loading branch information
Showing
1 changed file
with
74 additions
and
0 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