maybe accept single digit hexadecimal #23
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Given a rust debug {:x?} dump like:
I want to examine it with pretty2diag.rb. I remove the , from the output, since that's not accepted, but get complaints about it being too short. After some head scratching, I realize that the single hex digits are the problem:
d2 84 43 a1 01 26 a0 58 2a a1 19 09 c5 a3 01 69 70 72 6f 78 69 6d 69 74 79 02 c1 1a 5f 50 1d d2 0d 71 30 30 2d 44 30 2d 45 35 2d 46 32 2d 30 30 2d 30 32 40
and this works.
Looking at
pretty2diag.rb
, I see that it insists on every byte having two digits. Well... that is good if there are no spaces.After thinking about this for a bit, I think that if we accept space as being the second digit, then it works out right, but I don't have enough test data to be sure about this.