Skip to content

Commit

Permalink
Palette: use Palette::VARIANTS rather than reproduce
Browse files Browse the repository at this point in the history
As a side-effect of avoiding duplication, this adds the "python"
variant, which was added to inferno:

jonhoo/inferno#240

This commit does change the order shown in `--help`.
  • Loading branch information
jedbrown authored and djc committed Jun 27, 2023
1 parent aaee8da commit 1aeb2a8
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -522,10 +522,7 @@ pub struct FlamegraphOptions {
/// Color palette
#[clap(
long,
value_parser = PossibleValuesParser::new([
"hot", "mem", "io", "red", "green", "blue", "aqua", "yellow",
"purple", "orange", "wakeup", "java", "perl", "js", "rust"
]).map(|s| Palette::from_str(&s).unwrap())
value_parser = PossibleValuesParser::new(Palette::VARIANTS).map(|s| Palette::from_str(&s).unwrap())
)]
pub palette: Option<Palette>,

Expand Down

0 comments on commit 1aeb2a8

Please sign in to comment.