This commit is contained in:
		@@ -160,7 +160,7 @@ async fn read_from_db(id: u32) -> Option<Question> {
 | 
			
		||||
 | 
			
		||||
    match reader.get(index).await {
 | 
			
		||||
        Ok(question) => Some(question),
 | 
			
		||||
        Err(_) => None
 | 
			
		||||
        Err(_) => None,
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
async fn write_db() {
 | 
			
		||||
@@ -168,7 +168,8 @@ async fn write_db() {
 | 
			
		||||
    tokio::try_join!(
 | 
			
		||||
        tokio::spawn(zip_reader_task(tx)),
 | 
			
		||||
        tokio::spawn(db_writer_task(rx))
 | 
			
		||||
    ).expect("tokio join");
 | 
			
		||||
    )
 | 
			
		||||
    .expect("tokio join");
 | 
			
		||||
    println!("all done");
 | 
			
		||||
}
 | 
			
		||||
async fn db_writer_task(rx: UnboundedReceiver<Question>) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user