Improve panic!
messages in hex-literal
#664
Merged
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.
Thanks for making the
hex-literal
crate! I was using it with an escaped hex string I'd copied from a C program, but ran into a panic because I'd accidentally left a semicolon after the strings I was callinghex!()
on. It took me an embarrassing amount of time to discover the mistake, but I thought the panic messages might be able to provide a bit more info about what caused the failure.This PR does only a few small things:
TokenTreeIter
functions.hex!()
macro functionality in thetests/
directory (this was the only way I could find to set this up so the tests could invokehex!()
).I didn't touch the changelog because I figure if this gets merged it's not a substantial enough change to warrant that. Thanks and I'd appreciate any feedback.