-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v0.3 support for Option<Vec<T>> #285
Comments
This is because To suppress this special casing you can use a type alias, as described in changelog type Something = Vec<u8>;
#[derive(StructOpt)]
struct Opt {
#[structopt(short = "d", long = "data", parse(from_str = data_from_str))]
/// Data as a string
pub data: Option<Something>,
}
Also, pay attention that you don't need |
Ahh that's the one, thanks! |
hey thanks for making a super useful crate!
i've just updated from v0.2.x to v0.3.x and am running into a problem with parsing vectors that i'm not sure how to resolve.
In
v0.2.x
the following is valid, and passing an option-d something
ends up with a vector containingsomething
.In
v0.3.x
this results in an error from structopt deriveis it still possible to achieve this in
v0.3.x
?The text was updated successfully, but these errors were encountered: