From 671c3b2a554f83b39406691541d85c018cab96f9 Mon Sep 17 00:00:00 2001 From: fettpl <38704082+fettpl@users.noreply.github.com> Date: Sun, 15 Feb 2026 01:26:24 +0100 Subject: [PATCH] fix: replace unstable is_multiple_of and update Cargo.lock for sha2 The Docker image uses rust:1.83-slim where is_multiple_of is unstable. Also regenerates Cargo.lock to include the sha2 dependency. Co-Authored-By: Claude Opus 4.6 --- Cargo.lock | 12 ++++++++++++ src/security/secrets.rs | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 5a5debc..6e29ff6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1510,6 +1510,17 @@ dependencies = [ "digest", ] +[[package]] +name = "sha2" +version = "0.10.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + [[package]] name = "sharded-slab" version = "0.1.7" @@ -2491,6 +2502,7 @@ dependencies = [ "rusqlite", "serde", "serde_json", + "sha2", "shellexpand", "tempfile", "thiserror 2.0.18", diff --git a/src/security/secrets.rs b/src/security/secrets.rs index 3940843..bafad38 100644 --- a/src/security/secrets.rs +++ b/src/security/secrets.rs @@ -241,7 +241,7 @@ fn hex_encode(data: &[u8]) -> String { /// Hex-decode a hex string to bytes. fn hex_decode(hex: &str) -> Result> { - if !hex.len().is_multiple_of(2) { + if hex.len() % 2 != 0 { anyhow::bail!("Hex string has odd length"); } (0..hex.len())