diff --git a/app_async/src/main.rs b/app_async/src/main.rs index c127da8..71c50a8 100644 --- a/app_async/src/main.rs +++ b/app_async/src/main.rs @@ -153,7 +153,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)