Conversation
`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)
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes the dependabot alert on `main` (advisory #3) by bumping `rand` from 0.8.5 → 0.8.6.
Scope
`rand` is a transitive dependency through `quickcheck`, which is a `dev-dependency` only. Production builds of `base85-simd` do not link `rand`, so the vulnerability never reaches end users — but updating the lock file gets the alert off the default branch and keeps test/dev builds patched.
Change
One-line bump applied via:
```sh
cargo update -p rand --precise 0.8.6
```
The diff is two lines in `Cargo.lock` (version + checksum). No source changes are needed.
Test plan