Commit f649c4c 1 parent ab98945 commit f649c4c Copy full SHA for f649c4c
File tree 1 file changed +10
-10
lines changed
1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -135,6 +135,12 @@ fn make_opts() -> Options {
135
135
"Rust edition to use" ,
136
136
"[2015|2018|2021|2024]" ,
137
137
) ;
138
+ opts. optopt (
139
+ "" ,
140
+ "style-edition" ,
141
+ "The edition of the Style Guide (unstable)." ,
142
+ "[2015|2018|2021|2024]" ,
143
+ ) ;
138
144
opts. optopt (
139
145
"" ,
140
146
"color" ,
@@ -186,12 +192,6 @@ fn make_opts() -> Options {
186
192
"skip-children" ,
187
193
"Don't reformat child modules (unstable)." ,
188
194
) ;
189
- opts. optopt (
190
- "" ,
191
- "style-edition" ,
192
- "The edition of the Style Guide (unstable)." ,
193
- "[2015|2018|2021|2024]" ,
194
- ) ;
195
195
}
196
196
197
197
opts. optflag ( "v" , "verbose" , "Print verbose output" ) ;
@@ -628,6 +628,10 @@ impl GetOptsOptions {
628
628
options. edition = Some ( edition_from_edition_str ( edition_str) ?) ;
629
629
}
630
630
631
+ if let Some ( ref edition_str) = matches. opt_str ( "style-edition" ) {
632
+ options. style_edition = Some ( style_edition_from_style_edition_str ( edition_str) ?) ;
633
+ }
634
+
631
635
if matches. opt_present ( "backup" ) {
632
636
options. backup = true ;
633
637
}
@@ -654,10 +658,6 @@ impl GetOptsOptions {
654
658
}
655
659
}
656
660
657
- if let Some ( ref edition_str) = matches. opt_str ( "style-edition" ) {
658
- options. style_edition = Some ( style_edition_from_style_edition_str ( edition_str) ?) ;
659
- }
660
-
661
661
Ok ( options)
662
662
}
663
663
You can’t perform that action at this time.
0 commit comments