File tree Expand file tree Collapse file tree 2 files changed +5
-8
lines changed
Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -6,4 +6,4 @@ edition = "2024"
66clap = { version = " 4.0" , features = [" derive" ] }
77redis = { version = " 0.29.2" , features = [" tokio-comp" ] }
88tokio = { version = " 1" , features = [" full" ] }
9- anyhow = " 1.0"
9+ anyhow = " 1.0"
Original file line number Diff line number Diff line change @@ -36,11 +36,8 @@ async fn main() -> ExitCode {
3636 let args = Args :: parse ( ) ;
3737
3838 match args. mode . as_str ( ) {
39- "check" => try_check ( & args) . await . map_or ( 1 , |_| 0 ) ,
40- "test" => try_test ( & args) . await . map_or ( 1 , |_| 0 ) ,
41- _ => {
42- println ! ( "This `--mode` value is not supported." ) ;
43- 1
44- }
45- } . into ( )
39+ "check" => try_check ( & args) . await ,
40+ "test" => try_test ( & args) . await ,
41+ _ => Err ( anyhow ! ( "This `--mode` value is not supported." ) )
42+ } . map_or_else ( |err| { println ! ( "Error: {}" , err) ; 1 } , |_| 0 ) . into ( )
4643}
You can’t perform that action at this time.
0 commit comments