diff --git a/app_async/src/main.rs b/app_async/src/main.rs index 88e1256..6b21fb8 100644 --- a/app_async/src/main.rs +++ b/app_async/src/main.rs @@ -154,7 +154,7 @@ async fn read_from_db(id: u32) -> Option { let len = reader.len(); - let index = if len == 0 { + let index = if id == 0 { let mut rng = thread_rng(); let questions = Uniform::new(0, len); rng.sample(questions)