Skip to content

Commit a04387b

Browse files
chore(deps): bump rand from 0.8.5 to 0.9.0 (#22)
* chore(deps): bump rand from 0.8.5 to 0.9.0 Bumps [rand](https://github.com/rust-random/rand) from 0.8.5 to 0.9.0. - [Release notes](https://github.com/rust-random/rand/releases) - [Changelog](https://github.com/rust-random/rand/blob/master/CHANGELOG.md) - [Commits](rust-random/rand@0.8.5...0.9.0) --- updated-dependencies: - dependency-name: rand dependency-version: 0.9.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * fix!: rand deprecations --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jose Storopoli <[email protected]>
1 parent e027e85 commit a04387b

File tree

3 files changed

+100
-14
lines changed

3 files changed

+100
-14
lines changed

Cargo.lock

+97-11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ readme = "README.md"
99
[dependencies]
1010
anyhow = "1.0.97"
1111
dioxus = { version = "0.6.3", features = ["web"] }
12-
rand = "0.8.5"
12+
rand = "0.9.0"
1313
sudoku = "0.8"
1414
# Dioxus debug
1515
log = "0.4.27"

src/utils.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
use std::borrow::Cow;
1212

1313
use anyhow::{Error, Result};
14-
use rand::{seq::SliceRandom, thread_rng};
14+
use rand::{rng, seq::IndexedRandom};
1515
use sudoku::Sudoku;
1616

1717
use crate::app::SudokuState;
@@ -362,7 +362,7 @@ pub fn get_hint(current_sudoku: &SudokuState) -> Result<SudokuState> {
362362
}
363363
})
364364
.collect::<Vec<_>>()
365-
.choose(&mut thread_rng())
365+
.choose(&mut rng())
366366
.expect("could not get a random hint");
367367

368368
// Merge the random hint into the current SudokuState and return a new

0 commit comments

Comments
 (0)