You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
308 B

//! How to require presence of at least N values,
//! like `val1 val2 ... valN ... valM`.
use structopt::StructOpt;
#[derive(StructOpt, Debug)]
struct Opt {
#[structopt(required = true, min_values = 2)]
foos: Vec<String>,
}
fn main() {
let opt = Opt::from_args();
println!("{:?}", opt);
}