File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ fn exec_or_status(command: &mut Command) -> io::Result<ExitStatus> {
8989fn handle_result ( result : io:: Result < ExitStatus > , cmd : Command ) {
9090 match result {
9191 Err ( error) => {
92- eprintln ! ( "Failed to invoke `{:?}`: {}" , cmd , error ) ;
92+ eprintln ! ( "Failed to invoke `{cmd :?}`: {error}" ) ;
9393 }
9494 Ok ( status) => {
9595 process:: exit ( status. code ( ) . unwrap_or ( 1 ) ) ;
@@ -98,13 +98,10 @@ fn handle_result(result: io::Result<ExitStatus>, cmd: Command) {
9898}
9999
100100fn main ( ) {
101- match env:: args ( ) . skip ( 1 ) . next ( ) . as_deref ( ) {
102- Some ( "--wrapper-version" ) => {
103- let version = env ! ( "CARGO_PKG_VERSION" ) ;
104- println ! ( "{}" , version) ;
105- return ;
106- }
107- _ => { }
101+ if env:: args ( ) . nth ( 1 ) . is_some_and ( |s| s == "--wrapper-version" ) {
102+ let version = env ! ( "CARGO_PKG_VERSION" ) ;
103+ println ! ( "{version}" ) ;
104+ return ;
108105 }
109106 let current = match env:: current_dir ( ) {
110107 Ok ( dir) => dir,
You can’t perform that action at this time.
0 commit comments