Skip to content

Commit 564ae3b

Browse files
tmatthbarrbrain
authored andcommitted
benches: predict: use random to avoid deprecation warning
Fixes: ``` warning: use of deprecated method `rand::Rng::gen`: Renamed to `random` to avoid conflict with the new `gen` keyword in Rust 2024. ```
1 parent 1a1dce7 commit 564ae3b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

benches/predict.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ pub fn intra_bench<T: Pixel>(
126126
b: &mut Bencher, mode: PredictionMode, variant: PredictionVariant,
127127
) {
128128
let mut rng = ChaChaRng::from_seed([0; 32]);
129-
let edge_buf = Aligned::from_fn(|_| T::cast_from(rng.gen::<u8>()));
129+
let edge_buf = Aligned::from_fn(|_| T::cast_from(rng.random::<u8>()));
130130
let edge_buf = IntraEdge::mock(&edge_buf);
131131
let (mut block, ac) = generate_block::<T>(&mut rng);
132132
let cpu = CpuFeatureLevel::default();

0 commit comments

Comments
 (0)