Fix: Warn if configuring threads fails

User reported this unwrap could fail, so log an error instead of using a
naked unwrap.
This commit is contained in:
andy.boot
2022-08-25 08:56:30 +01:00
parent c148cd9044
commit dfce0eec66
+1 -1
View File
@@ -158,7 +158,7 @@ fn main() {
rayon::ThreadPoolBuilder::new() rayon::ThreadPoolBuilder::new()
.stack_size(usize::pow(1024, 3)) .stack_size(usize::pow(1024, 3))
.build_global() .build_global()
.unwrap(); .unwrap_or_else(|e| eprintln!("Warning: Could not configure threads {:?}", e));
let iso = config.get_iso(&options); let iso = config.get_iso(&options);
let (top_level_nodes, has_errors) = walk_it(simplified_dirs, walk_data); let (top_level_nodes, has_errors) = walk_it(simplified_dirs, walk_data);