From 8f09c68fa0b289f0a9918d2e659ad39d365da314 Mon Sep 17 00:00:00 2001 From: trivernis Date: Tue, 10 Mar 2020 23:08:13 +0100 Subject: [PATCH] Remove waiting for thread since the thread will be killed when the program exists anyway --- src/main.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 0f71a09..06e5f21 100644 --- a/src/main.rs +++ b/src/main.rs @@ -213,7 +213,7 @@ fn decrypt_with_dictionary_file( let mut pb = ProgressBar::new((get_line_count(&filename) as f64 / LINES_PER_CHUNK as f64).ceil() as u64); let (rx, tx) = sync_channel::>(10); - let handle = thread::spawn(move || { + let _handle = thread::spawn(move || { let mut line_vec: Vec = vec![]; reader.lines().for_each(|line_result| { if line_vec.len() > LINES_PER_CHUNK { @@ -248,7 +248,6 @@ fn decrypt_with_dictionary_file( break; } } - handle.join().expect("Failed to wait for thread."); pb.finish(); result_data }