mirror of
https://github.com/eza-community/eza
synced 2024-10-14 11:52:36 +00:00
workaround for num_cpus returning 0 (#1034)
workaround for num_cpus returning 0
This commit is contained in:
parent
42659f9345
commit
c968c388d4
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue