Skip to content

Commit

Permalink
bump rand
Browse files Browse the repository at this point in the history
  • Loading branch information
bomgar committed Feb 3, 2025
1 parent 1d59733 commit 1d44811
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 13 deletions.
41 changes: 31 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ git2 = "0.20"
maplit = "1.0"
rayon = "1"
regex = "1"
rand = "0.8"
rand = "0.9"
crossbeam = "0"
indicatif = "0"
openssl-probe = "0.1"
Expand Down
4 changes: 2 additions & 2 deletions src/util/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use yansi::Color;

use rand::seq::SliceRandom;
use rand::seq::IndexedRandom;

use std::borrow::ToOwned;

Expand All @@ -20,6 +20,6 @@ pub static COLOURS: [Color; 12] = [
];

pub fn random_color() -> Color {
let mut rng = rand::thread_rng();
let mut rng = rand::rng();
COLOURS.choose(&mut rng).map(ToOwned::to_owned).unwrap_or(Color::Black)
}

0 comments on commit 1d44811

Please sign in to comment.