@@ -70,42 +70,14 @@ fn main() -> Result<()> {
70
70
install ( opts) ?
71
71
}
72
72
"codegen" => {
73
- if matches. contains ( [ "-h" , "--help" ] ) {
74
- help:: print_no_param_subcommand_help ( & subcommand) ;
75
- return Ok ( ( ) ) ;
76
- }
77
73
codegen:: generate_syntax ( Mode :: Overwrite ) ?;
78
74
codegen:: generate_parser_tests ( Mode :: Overwrite ) ?;
79
75
codegen:: generate_assists_docs ( Mode :: Overwrite ) ?;
80
76
}
81
- "format" => {
82
- if matches. contains ( [ "-h" , "--help" ] ) {
83
- help:: print_no_param_subcommand_help ( & subcommand) ;
84
- return Ok ( ( ) ) ;
85
- }
86
- run_rustfmt ( Mode :: Overwrite ) ?
87
- }
88
- "install-pre-commit-hook" => {
89
- if matches. contains ( [ "-h" , "--help" ] ) {
90
- help:: print_no_param_subcommand_help ( & subcommand) ;
91
- return Ok ( ( ) ) ;
92
- }
93
- install_pre_commit_hook ( ) ?
94
- }
95
- "lint" => {
96
- if matches. contains ( [ "-h" , "--help" ] ) {
97
- help:: print_no_param_subcommand_help ( & subcommand) ;
98
- return Ok ( ( ) ) ;
99
- }
100
- run_clippy ( ) ?
101
- }
102
- "fuzz-tests" => {
103
- if matches. contains ( [ "-h" , "--help" ] ) {
104
- help:: print_no_param_subcommand_help ( & subcommand) ;
105
- return Ok ( ( ) ) ;
106
- }
107
- run_fuzzer ( ) ?
108
- }
77
+ "format" => run_rustfmt ( Mode :: Overwrite ) ?,
78
+ "install-pre-commit-hook" => install_pre_commit_hook ( ) ?,
79
+ "lint" => run_clippy ( ) ?,
80
+ "fuzz-tests" => run_fuzzer ( ) ?,
109
81
_ => eprintln ! ( "{}" , help:: GLOBAL_HELP ) ,
110
82
}
111
83
Ok ( ( ) )
0 commit comments