/// Represents how many threads will be used to run steps in parallel.
pub enum ThreadNumber {
    /// Thread number that will match number of cores on your machine.
    MatchCores,
    /// Specific number of threads.
    Specific(usize),
}

impl Into<usize> for ThreadNumber {
    fn into(self) -> usize {
        match self {
            ThreadNumber::MatchCores => std::thread::available_parallelism()
                .expect("could not acquire machine core number")
                .get(),
            ThreadNumber::Specific(number) => number,
        }
    }
}
