File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,8 @@ use crate::{
15
15
16
16
#[ cfg_attr( feature = "otel" , tracing:: instrument) ]
17
17
pub fn main ( ) -> Result < utils:: ExitCode > {
18
+ use clap:: error:: ErrorKind ;
19
+
18
20
let args: Vec < _ > = process ( ) . args ( ) . collect ( ) ;
19
21
let arg1 = args. get ( 1 ) . map ( |a| & * * a) ;
20
22
@@ -107,10 +109,7 @@ pub fn main() -> Result<utils::ExitCode> {
107
109
108
110
let matches = match cli. try_get_matches_from ( process ( ) . args_os ( ) ) {
109
111
Ok ( matches) => matches,
110
- Err ( e)
111
- if e. kind ( ) == clap:: error:: ErrorKind :: DisplayHelp
112
- || e. kind ( ) == clap:: error:: ErrorKind :: DisplayVersion =>
113
- {
112
+ Err ( e) if [ ErrorKind :: DisplayHelp , ErrorKind :: DisplayVersion ] . contains ( & e. kind ( ) ) => {
114
113
write ! ( process( ) . stdout( ) . lock( ) , "{e}" ) ?;
115
114
return Ok ( utils:: ExitCode ( 0 ) ) ;
116
115
}
You can’t perform that action at this time.
0 commit comments