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> {
89
89
fn handle_result ( result : io:: Result < ExitStatus > , cmd : Command ) {
90
90
match result {
91
91
Err ( error) => {
92
- eprintln ! ( "Failed to invoke `{:?}`: {}" , cmd , error ) ;
92
+ eprintln ! ( "Failed to invoke `{cmd :?}`: {error}" ) ;
93
93
}
94
94
Ok ( status) => {
95
95
process:: exit ( status. code ( ) . unwrap_or ( 1 ) ) ;
@@ -98,13 +98,10 @@ fn handle_result(result: io::Result<ExitStatus>, cmd: Command) {
98
98
}
99
99
100
100
fn 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 ;
108
105
}
109
106
let current = match env:: current_dir ( ) {
110
107
Ok ( dir) => dir,
You can’t perform that action at this time.
0 commit comments