Browse Source

Use ValueEnum over deprecated ArgEnum

pull/21/head
Steve Cook 2 years ago
parent
commit
f05b57f5ac
  1. 6
      src/commands/mod.rs

6
src/commands/mod.rs

@ -1,14 +1,14 @@
use clap::{ArgEnum, Parser}; use clap::{ValueEnum, Parser};
use std::fmt::{Display, Formatter}; use std::fmt::{Display, Formatter};
#[derive(Parser)] #[derive(Parser)]
pub struct Input { pub struct Input {
#[clap(arg_enum)] #[clap(value_enum)]
pub cmd: CargoCommand, pub cmd: CargoCommand,
pub cargo_opts: Vec<String>, pub cargo_opts: Vec<String>,
} }
#[derive(ArgEnum, Copy, Clone, Ord, PartialOrd, Eq, PartialEq)] #[derive(ValueEnum, Copy, Clone, Ord, PartialOrd, Eq, PartialEq)]
pub enum CargoCommand { pub enum CargoCommand {
Build, Build,
Run, Run,

Loading…
Cancel
Save