Fix format

This commit is contained in:
Thayne McCombs 2022-10-14 23:14:03 -06:00
parent b6f0088b68
commit aec125637b

View file

@ -4,8 +4,8 @@ use std::time::Duration;
#[cfg(feature = "completions")] #[cfg(feature = "completions")]
use anyhow::anyhow; use anyhow::anyhow;
use clap::{ use clap::{
error::ErrorKind, value_parser, Arg, ArgAction, ArgGroup, error::ErrorKind, value_parser, Arg, ArgAction, ArgGroup, ArgMatches, Command, Parser,
ArgMatches, Command, Parser, ValueEnum, ValueEnum,
}; };
#[cfg(feature = "completions")] #[cfg(feature = "completions")]
use clap_complete::Shell; use clap_complete::Shell;
@ -558,7 +558,11 @@ impl Opts {
// unlikely fd will be running in such an environment, and even more unlikely someone would // unlikely fd will be running in such an environment, and even more unlikely someone would
// be trying to use that many threads on such an environment, so I think panicing is an // be trying to use that many threads on such an environment, so I think panicing is an
// appropriate way to handle that. // appropriate way to handle that.
std::cmp::max(self.threads.map_or_else(num_cpus::get, |n| n.try_into().expect("too many threads")), 1) std::cmp::max(
self.threads
.map_or_else(num_cpus::get, |n| n.try_into().expect("too many threads")),
1,
)
} }
pub fn max_results(&self) -> Option<usize> { pub fn max_results(&self) -> Option<usize> {