s3m / s3m

CLI for streams of data in S3 buckets

Home Page:https://s3m.stream

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ensure min/max when using num_cpus return 1 or max i16

nbari opened this issue · comments

This:

let num_threads = (num_cpus::get_physical() - 2).max(1).to_string();

Is used in:

.arg(
            Arg::new("number")
            .help("Number of max concurrent requests")
            .short('n')
            .long("number")
            .default_value(num_threads)
            .value_parser(clap::value_parser!(u16).range(1..=3500))
            .num_args(1)
        )

But the output is never verified before to be < 3500

#23 (comment)