Skip to content

Changelog for optional vectors may have wrong example for old behaviour #249

@AluisioASG

Description

@AluisioASG

From the changelog; issue in comments:

If you need to fall back to the old behavior you can use a type alias:

type Something = Vec<String>; // Not actually used
#[derive(StructOpt)]
struct Opt {
  #[structopt(long)]
  fruit: Option<Vec<String>>, // Shouldn't this be `Option<Something>`?
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions