Skip to content
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

Remove hex crate dependency #3594

Open
jcamiel opened this issue Jan 15, 2025 · 0 comments
Open

Remove hex crate dependency #3594

jcamiel opened this issue Jan 15, 2025 · 0 comments
Labels
dependencies Pull requests that update a dependency file good first issue Good for newcomers

Comments

@jcamiel
Copy link
Collaborator

jcamiel commented Jan 15, 2025

In

Value::Bytes(
hex!("a8100ae6aa1940d0b663bb31cd466142ebbdbd5187131b92d93818987832eb89").to_vec()
)
we're using the hex-literal crate.

The macro hex! is just use for test, in only one instance, it would be better to remove the dependency on hex-literal and replace the hex!. by a private function in the test module:

fn decode_hex(s: &str) -> Result<Vec<u8>, ParseIntError> {
    (0..s.len())
        .step_by(2)
        .map(|i| u8::from_str_radix(&s[i..i + 2], 16))
        .collect()
}
@jcamiel jcamiel added dependencies Pull requests that update a dependency file good first issue Good for newcomers labels Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant