We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9e16e50 commit 0372c01Copy full SHA for 0372c01
1 file changed
src-tauri/src/db.rs
@@ -1,5 +1,5 @@
1
use chrono::Utc;
2
-use rand::seq::SliceRandom;
+use rand::prelude::IndexedRandom;
3
use rusqlite::{Connection, Result};
4
use serde::{Deserialize, Serialize};
5
use std::path::PathBuf;
@@ -110,9 +110,9 @@ impl Database {
110
.collect();
111
112
let chosen = if available.is_empty() {
113
- restaurants.choose(&mut rand::thread_rng()).unwrap()
+ restaurants.choose(&mut rand::rng()).unwrap()
114
} else {
115
- available.choose(&mut rand::thread_rng()).unwrap()
+ available.choose(&mut rand::rng()).unwrap()
116
};
117
118
// Record selection
0 commit comments