Skip to content

Advice on help menu that shows same possible enum values too often #5203

Answered by epage
fritzrehde asked this question in Q&A
Discussion options

You must be logged in to vote
use clap::ValuEnum;

#[derive(ValueEnum)]
struct Color {
    // ...
}

Color::value_variants().map(|v| v.to_possible_value().get_name().to_owned())

Replies: 2 comments 13 replies

Comment options

You must be logged in to vote
9 replies
@fritzrehde
Comment options

@epage
Comment options

@fritzrehde
Comment options

@epage
Comment options

Answer selected by fritzrehde
@fritzrehde
Comment options

Comment options

You must be logged in to vote
4 replies
@epage
Comment options

@fritzrehde
Comment options

@epage
Comment options

@fritzrehde
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants