From ac3e3ed9f526190bc09060cb34fe9b5586a23a46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Rigo?= Date: Mon, 14 Aug 2023 16:35:28 +0200 Subject: [PATCH] Use arg! instead of Arg in crc --- src/crcapp.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/crcapp.rs b/src/crcapp.rs index e544884..f1d0b05 100644 --- a/src/crcapp.rs +++ b/src/crcapp.rs @@ -1,7 +1,7 @@ extern crate crc; use crate::applet::Applet; use anyhow::{bail, Result}; -use clap::{arg, Arg, Command}; +use clap::{arg, Command}; use crc::*; use std::process; @@ -84,11 +84,7 @@ impl Applet for CRCApplet { Command::new(self.command()) .about(self.description()) .arg(arg!(-l --list "List supported CRC algorithms")) - .arg( - Arg::new("type") - .help("CRC type to compute") - .required_unless_present("list"), - ) + .arg(arg!( "CRC type to compute").required_unless_present("list")) .arg(arg!([value] "input value, reads from stdin in not present")) }