just/src/subcommand.rs
Casey Rodarmor 48b25c14b1
Use constants instead of literals in arg parser (#504)
- Differentiate between `arg`s, which are flags and options, and `cmd`s,
  which are mutually exclusive subcommands

- Replace string literals, like "EVALUATE", with constants, like
  `cmd::EVALUATE`, since they're slightly less error prone.

- Remove `Config::evaluate`, and handle it like other subcommands
2019-10-31 17:39:25 -07:00

11 lines
136 B
Rust

#[derive(PartialEq)]
pub(crate) enum Subcommand<'a> {
Dump,
Edit,
Evaluate,
List,
Run,
Show { name: &'a str },
Summary,
}