From 726977a1b3291a9197aec5cfb862365744eeb60b Mon Sep 17 00:00:00 2001 From: trivernis Date: Sun, 15 Mar 2020 18:00:00 +0100 Subject: [PATCH] Fix wrong mathematical operation used --- src/io.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/io.rs b/src/io.rs index 9753ae8..3cc97ee 100644 --- a/src/io.rs +++ b/src/io.rs @@ -247,7 +247,7 @@ impl BDFReader { /// Starts threads for decompressing chunks fn start_threads(&mut self) { - for _ in 0..(num_cpus::get() as f32/2f32).min(1f32) as usize { + for _ in 0..(num_cpus::get() as f32/2f32).max(1f32) as usize { thread::spawn({ let r = self.thread_manager.receiver_work.clone(); let s = self.thread_manager.sender_result.clone();