From 12a90765e0647cf1369a2d71353d54aab2196aff Mon Sep 17 00:00:00 2001 From: Dan Draper Date: Fri, 1 May 2026 22:22:55 +1000 Subject: [PATCH 1/2] chore(deps): bump rand to 0.8.6 for RUSTSEC advisory `rand` is a transitive dependency through `quickcheck` (a dev-dep only), so production builds of `base85-simd` are not affected. The update closes the dependabot alert flagged on the default branch. No source changes are needed. `cargo update -p rand --precise 0.8.6` touches only the lock file (one version + one checksum line). Tested: - cargo test --locked (47 tests + 1 doctest all pass) - cargo clippy --all-targets --locked -- -D warnings (clean) --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ed189b7..f97f6f6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -350,9 +350,9 @@ dependencies = [ [[package]] name = "rand" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +checksum = "5ca0ecfa931c29007047d1bc58e623ab12e5590e8c7cc53200d5202b69266d8a" dependencies = [ "rand_core", ] From 00a745ab947f57f2b93f25924b390d95ba5cbacb Mon Sep 17 00:00:00 2001 From: Dan Draper Date: Fri, 1 May 2026 22:26:24 +1000 Subject: [PATCH 2/2] test: drop dead `if n == 0` branch in decode_tail_round_trip MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Clippy 1.95 added `manual_checked_ops`, which flags this pattern: .step_by(if n == 0 { 1 } else { 256 / n + 1 }) The `n == 0` branch is dead — the loop iterates `1..=3usize`, so `n` is never zero. Removing it satisfies the new lint and slightly simplifies the test. No behaviour change. --- src/block.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/block.rs b/src/block.rs index 0deaf5f..ef040fc 100644 --- a/src/block.rs +++ b/src/block.rs @@ -549,10 +549,10 @@ mod tests { #[test] fn decode_tail_round_trip() { for n in 1..=3usize { - let input: Vec = (0u8..=255) - .step_by(if n == 0 { 1 } else { 256 / n + 1 }) - .take(n) - .collect(); + // n ∈ {1, 2, 3}; step_by stride spreads `take(n)` samples across + // the byte range. `n == 0` would divide-by-zero, but it's + // excluded by the loop bounds. + let input: Vec = (0u8..=255).step_by(256 / n + 1).take(n).collect(); let encoded = base85::encode(&input); let mut out = vec![0u8; n]; decode_tail(encoded.as_bytes(), &mut out, 0).expect("valid encoding");