Skip to content

fix(deps): update rust crate rand to 0.9 #455

fix(deps): update rust crate rand to 0.9

fix(deps): update rust crate rand to 0.9 #455

Triggered via push February 6, 2025 09:52
Status Success
Total duration 32m 26s
Artifacts

deny-check.yml

on: push
Matrix: cargo-deny
Fit to window
Zoom out
Zoom in

Annotations

2 errors and 2 warnings
no function or associated item named `from_entropy` found for struct `rand::prelude::SmallRng` in the current scope: crates/shadowsocks/src/relay/mod.rs#L21
error[E0599]: no function or associated item named `from_entropy` found for struct `rand::prelude::SmallRng` in the current scope --> crates/shadowsocks/src/relay/mod.rs:21:72 | 21 | static PADDING_RNG: RefCell<SmallRng> = RefCell::new(SmallRng::from_entropy()); | ^^^^^^^^^^^^ function or associated item not found in `SmallRng` | help: there is an associated function `from_rng` with a similar name --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rand_core-0.9.0/src/lib.rs:460:5 | 460 | fn from_rng(rng: &mut impl RngCore) -> Self { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
the trait bound `rand::distr::StandardUniform: rand::distr::Distribution<usize>` is not satisfied: crates/shadowsocks/src/relay/mod.rs#L25
error[E0277]: the trait bound `rand::distr::StandardUniform: rand::distr::Distribution<usize>` is not satisfied --> crates/shadowsocks/src/relay/mod.rs:25:55 | 25 | PADDING_RNG.with(|rng| rng.borrow_mut().gen::<usize>() % AEAD2022_MAX_PADDING_SIZE) | ^^^^^ the trait `rand::distr::Distribution<usize>` is not implemented for `rand::distr::StandardUniform` | note: there are multiple different versions of crate `rand` in the dependency graph --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rand-0.9.0/src/distr/distribution.rs:35:1 | 35 | pub trait Distribution<T> { | ^^^^^^^^^^^^^^^^^^^^^^^^^ this is the required trait | ::: crates/shadowsocks/src/relay/mod.rs:18:9 | 18 | use rand::{rngs::SmallRng, Rng, SeedableRng}; | ---- one version of crate `rand` is used here, as a direct dependency of the current crate | ::: crates/shadowsocks/src/lib.rs:14:9 | 14 | pub use shadowsocks_crypto as crypto; | ------------------ one version of crate `rand` is used here, as a dependency of crate `shadowsocks_crypto` | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rand-0.9.0/src/distr/mod.rs:210:1 | 210 | pub struct StandardUniform; | -------------------------- this type doesn't implement the required trait | ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rand-0.8.5/src/distributions/distribution.rs:35:1 | 35 | pub trait Distribution<T> { | ------------------------- this is the found trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `rand::Rng::gen` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rand-0.9.0/src/rng.rs:326:26 | 324 | fn r#gen<T>(&mut self) -> T | ----- required by a bound in this associated function 325 | where 326 | StandardUniform: Distribution<T>, | ^^^^^^^^^^^^^^^ required by this bound in `Rng::gen`
use of deprecated method `rand::Rng::gen`: Renamed to `random` to avoid conflict with the new `gen` keyword in Rust 2024.: crates/shadowsocks/src/relay/mod.rs#L25
warning: use of deprecated method `rand::Rng::gen`: Renamed to `random` to avoid conflict with the new `gen` keyword in Rust 2024. --> crates/shadowsocks/src/relay/mod.rs:25:49 | 25 | PADDING_RNG.with(|rng| rng.borrow_mut().gen::<usize>() % AEAD2022_MAX_PADDING_SIZE) | ^^^ | = note: `#[warn(deprecated)]` on by default
unused import: `SeedableRng`: crates/shadowsocks/src/relay/mod.rs#L18
warning: unused import: `SeedableRng` --> crates/shadowsocks/src/relay/mod.rs:18:37 | 18 | use rand::{rngs::SmallRng, Rng, SeedableRng}; | ^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default