From e452b8d6b56747522512f3e66acb442e8b8e4663 Mon Sep 17 00:00:00 2001 From: Matthew Esposito Date: Tue, 26 Dec 2023 20:00:36 -0500 Subject: [PATCH] Update oauth::choose to use new fastrand::choose_multiple --- src/oauth.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/oauth.rs b/src/oauth.rs index 951ab75..7c9182c 100644 --- a/src/oauth.rs +++ b/src/oauth.rs @@ -212,7 +212,7 @@ impl Device { // Waiting on fastrand 2.0.0 for the `choose` function // https://github.com/smol-rs/fastrand/pull/59/ fn choose(list: &[T]) -> T { - list[fastrand::usize(..list.len())] + *fastrand::choose_multiple(list.into_iter(), 1)[0] } #[tokio::test(flavor = "multi_thread", worker_threads = 1)]