From dfce0eec660c10ac7874964a9c84fdf767f01894 Mon Sep 17 00:00:00 2001 From: "andy.boot" Date: Thu, 25 Aug 2022 08:56:30 +0100 Subject: [PATCH] Fix: Warn if configuring threads fails User reported this unwrap could fail, so log an error instead of using a naked unwrap. --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index f020f1c..ca95236 100644 --- a/src/main.rs +++ b/src/main.rs @@ -158,7 +158,7 @@ fn main() { rayon::ThreadPoolBuilder::new() .stack_size(usize::pow(1024, 3)) .build_global() - .unwrap(); + .unwrap_or_else(|e| eprintln!("Warning: Could not configure threads {:?}", e)); let iso = config.get_iso(&options); let (top_level_nodes, has_errors) = walk_it(simplified_dirs, walk_data);