Merge pull request #44 from sahajre/patch-1

Use of stable lib feature instead of experimental
This commit is contained in:
Argenis 2026-02-14 15:58:53 -05:00 committed by GitHub
commit 365692853c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -241,7 +241,7 @@ fn hex_encode(data: &[u8]) -> String {
/// Hex-decode a hex string to bytes.
fn hex_decode(hex: &str) -> Result<Vec<u8>> {
if !hex.len().is_multiple_of(2) {
if hex.len() % 2 != 0 {
anyhow::bail!("Hex string has odd length");
}
(0..hex.len())