diff --git a/src/output/details.rs b/src/output/details.rs index 9dca7d40..62ef7d82 100644 --- a/src/output/details.rs +++ b/src/output/details.rs @@ -147,7 +147,11 @@ impl<'a> AsRef> for Egg<'a> { impl<'a> Render<'a> { pub fn render(mut self, w: &mut W) -> io::Result<()> { - let mut pool = Pool::new(num_cpus::get() as u32); + let n_cpus = match num_cpus::get() as u32 { + 0 => 1, + n => n, + }; + let mut pool = Pool::new(n_cpus); let mut rows = Vec::new(); if let Some(ref table) = self.opts.table {