@@ -34,12 +34,14 @@ impl fmt::Display for CliParseError {
34
34
match self {
35
35
CliParseError :: UnexpectedFlag ( flag) => write ! ( f, "Unexpected flag: {flag}" ) ,
36
36
CliParseError :: DuplicateFlag ( flag) => write ! ( f, "Cannot use {flag} more than once" ) ,
37
- CliParseError :: MutuallyExclusiveFlags => write ! (
38
- f,
39
- "Flags {} and {} are mutually exclusive, so they cannot be used together." ,
40
- HelpOrVersion :: Help ,
41
- HelpOrVersion :: Version
42
- ) ,
37
+ CliParseError :: MutuallyExclusiveFlags => {
38
+ write ! (
39
+ f,
40
+ "Flags {} and {} are mutually exclusive, so they cannot be used together." ,
41
+ HelpOrVersion :: Help ,
42
+ HelpOrVersion :: Version
43
+ )
44
+ } ,
43
45
CliParseError :: UnknownArgument ( arg) => write ! ( f, "Unknown argument: {arg}" ) ,
44
46
CliParseError :: EmptyArgument ( arg) => write ! ( f, "Empty argument: {arg}" ) ,
45
47
CliParseError :: InvalidArgument ( arg) => write ! ( f, "Invalid argument: {arg}" ) ,
@@ -65,11 +67,13 @@ impl fmt::Display for CliParseError {
65
67
write ! ( f, "{pr} must be followed by a commit hash" )
66
68
} ,
67
69
CliParseError :: InvalidRepo ( repo) => write ! ( f, "Invalid repo: {repo}" ) ,
68
- CliParseError :: CheckoutNoSource => write ! (
69
- f,
70
- "Expected at least 1 argument when using the {} flag" ,
71
- LocalFlag :: Checkout
72
- ) ,
70
+ CliParseError :: CheckoutNoSource => {
71
+ write ! (
72
+ f,
73
+ "Expected at least 1 argument when using the {} flag" ,
74
+ LocalFlag :: Checkout
75
+ )
76
+ } ,
73
77
CliParseError :: InvalidCommitHash ( commit) => {
74
78
write ! ( f, "{commit} is not a valid commit hash" )
75
79
} ,
@@ -165,10 +169,12 @@ impl Cli {
165
169
"pr-fetch" => {
166
170
Subcommand :: PrFetch ( pr_fetch:: PrFetch :: parse ( & mut args, & mut global_flag) ?)
167
171
} ,
168
- "branch-fetch" => Subcommand :: BranchFetch ( branch_fetch:: BranchFetch :: parse (
169
- & mut args,
170
- & mut global_flag,
171
- ) ?) ,
172
+ "branch-fetch" => {
173
+ Subcommand :: BranchFetch ( branch_fetch:: BranchFetch :: parse (
174
+ & mut args,
175
+ & mut global_flag,
176
+ ) ?)
177
+ } ,
172
178
arg => return Err ( CliParseError :: UnknownSubcommand ( arg. to_owned ( ) ) ) ,
173
179
} ) ;
174
180
}
0 commit comments