File tree 1 file changed +5
-3
lines changed
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -438,7 +438,7 @@ struct GetOptsOptions {
438
438
emit_mode : EmitMode ,
439
439
backup : bool ,
440
440
check : bool ,
441
- edition : Edition ,
441
+ edition : Option < Edition > ,
442
442
color : Option < Color > ,
443
443
file_lines : FileLines , // Default is all lines in all files.
444
444
unstable_features : bool ,
@@ -503,7 +503,7 @@ impl GetOptsOptions {
503
503
}
504
504
505
505
if let Some ( ref edition_str) = matches. opt_str ( "edition" ) {
506
- options. edition = edition_from_edition_str ( edition_str) ?;
506
+ options. edition = Some ( edition_from_edition_str ( edition_str) ?) ;
507
507
}
508
508
509
509
if matches. opt_present ( "backup" ) {
@@ -559,7 +559,9 @@ impl CliOptions for GetOptsOptions {
559
559
if let Some ( error_on_unformatted) = self . error_on_unformatted {
560
560
config. set ( ) . error_on_unformatted ( error_on_unformatted) ;
561
561
}
562
- config. set ( ) . edition ( self . edition ) ;
562
+ if let Some ( edition) = self . edition {
563
+ config. set ( ) . edition ( edition) ;
564
+ }
563
565
if self . check {
564
566
config. set ( ) . emit_mode ( EmitMode :: Diff ) ;
565
567
} else {
You can’t perform that action at this time.
0 commit comments