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::{
1515
1616#[ cfg_attr( feature = "otel" , tracing:: instrument) ]
1717pub fn main ( ) -> Result < utils:: ExitCode > {
18+ use clap:: error:: ErrorKind ;
19+
1820 let args: Vec < _ > = process ( ) . args ( ) . collect ( ) ;
1921 let arg1 = args. get ( 1 ) . map ( |a| & * * a) ;
2022
@@ -107,10 +109,7 @@ pub fn main() -> Result<utils::ExitCode> {
107109
108110 let matches = match cli. try_get_matches_from ( process ( ) . args_os ( ) ) {
109111 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 ( ) ) => {
114113 write ! ( process( ) . stdout( ) . lock( ) , "{e}" ) ?;
115114 return Ok ( utils:: ExitCode ( 0 ) ) ;
116115 }
You can’t perform that action at this time.
0 commit comments