From dbf9e8cdac94364386d16963a4bc1c3960237d87 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Mon, 10 Oct 2022 16:13:27 +0300 Subject: [PATCH] rename reader_task --- src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index 926d471..c927639 100644 --- a/src/main.rs +++ b/src/main.rs @@ -58,7 +58,7 @@ struct Cli { measure: bool, } -fn reader_task(tx: mpsc::Sender) { +fn zip_reader_task(tx: mpsc::Sender) { let zip_file = fs::File::open(ZIP_FILENAME).unwrap(); let zip_reader = io::BufReader::new(zip_file); let archive = zip::ZipArchive::new(zip_reader).unwrap(); @@ -124,7 +124,7 @@ fn db_writer_task(rx: mpsc::Receiver) { fn write_db() { let (tx, rx) = mpsc::channel::(); [ - thread::spawn(move || reader_task(tx)), + thread::spawn(move || zip_reader_task(tx)), thread::spawn(move || db_writer_task(rx)), ] .into_iter() @@ -258,7 +258,7 @@ fn read_from_db2(id: u32) -> Option { fn write_db2() { let (tx, rx) = mpsc::channel::(); [ - thread::spawn(move || reader_task(tx)), + thread::spawn(move || zip_reader_task(tx)), thread::spawn(move || db_writer2_task(rx)), ] .into_iter()