-
Notifications
You must be signed in to change notification settings - Fork 346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: Roll our own hex utils #4470
Conversation
db4b2f9
to
9811f5a
Compare
lib/src/hex_util.rs
Outdated
@@ -14,7 +14,17 @@ | |||
|
|||
#![allow(missing_docs)] | |||
|
|||
fn to_reverse_hex_digit(b: u8) -> Option<u8> { | |||
pub fn to_reverse_hex_digit(b: u8) -> u8 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: might be simpler to do hex encoding by ourselves. It won't gain SIMD optimization, but the performance wouldn't matter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As in roll all the hex stuff ourselves and put it into this module? Fine by me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I just meant to_reverse_hex(&str) -> Option<String>
could be reimplemented as encode_reverse_hex(&[u8]) -> String
.
It might be okay to self-host all hex encoding functions if that helps reduce dependency, though.
233f3cf
to
b746a32
Compare
hex
crate with faster_hex
0f5419f
to
e699f90
Compare
`hex` does not seem to be maintained any longer and we already transitively depend on `faster_hex` anyways.
e699f90
to
0d2a154
Compare
Why is CI running nightly rustfmt 😕 |
The current state of the repository seems compatible with |
0d2a154
to
0ef4d22
Compare
Ah wait, this is rustfmt working differently depending on how its invoked again I think (bare |
Closing this as I don't really have the drive for this refactoring right now |
hex
does not seem to be maintained any longer and we already transitively depend onfaster_hex
anyways.Checklist
If applicable:
CHANGELOG.md