Use of stable lib feature instead of experimental

The is_multiple_of is a new, experimental feature  introduced to the Rust standard library, but it is not yet stabilized. It requires the nightly compiler to work. Therefore, replacing it with the equivalent modulo operator (%) from stable release.
This commit is contained in:
Rahul Madhav Upakare 2026-02-15 01:41:47 +05:30 committed by GitHub
parent 4fce8a5004
commit 29437f21e4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -238,7 +238,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())