argh
argh copied to clipboard
Vec with default does not work
You can't have a repeated option with a default it looks like:
#[derive(FromArgs, PartialEq, Debug, Clone)]
/// Foo
#[argh(description = "foo")]
pub struct TestArgs {
/// test repeated with default
#[argh(option, default = "default_param_req()")]
pub param: Vec<String>,
}
fn default_param_req() -> Vec<String> {
vec!["foo".to_string(), "bar".to_string()]
}
fails with:
the trait bound `std::vec::Vec<String>: std::str::FromStr` is not satisfied