mirror of
https://github.com/Llewellynvdm/exa.git
synced 2024-11-22 03:55:11 +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 New Issue
Block a user