|
|
@@ -147,7 +147,11 @@ impl<'a> AsRef<File<'a>> for Egg<'a> {
|
|
|
|
|
|
impl<'a> Render<'a> {
|
|
|
pub fn render<W: Write>(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 {
|