@@ -448,12 +448,8 @@ pub enum CheckoutOptions {
448448impl CheckoutOptions {
449449 pub const fn previous ( self ) -> Self {
450450 match self {
451- Self :: KeepLocalChanges => {
452- Self :: Discard
453- }
454- Self :: Unchange => {
455- Self :: KeepLocalChanges
456- }
451+ Self :: KeepLocalChanges => Self :: Discard ,
452+ Self :: Unchange => Self :: KeepLocalChanges ,
457453 Self :: Discard => Self :: Unchange ,
458454 }
459455 }
@@ -462,13 +458,13 @@ impl CheckoutOptions {
462458 match self {
463459 Self :: KeepLocalChanges => Self :: Unchange ,
464460 Self :: Unchange => Self :: Discard ,
465- Self :: Discard => {
466- Self :: KeepLocalChanges
467- }
461+ Self :: Discard => Self :: KeepLocalChanges ,
468462 }
469463 }
470464
471- pub const fn to_string_pair ( self ) -> ( & ' static str , & ' static str ) {
465+ pub const fn to_string_pair (
466+ self ,
467+ ) -> ( & ' static str , & ' static str ) {
472468 const CHECKOUT_OPTION_STASH_AND_REAPPLY : & str =
473469 " 🟢 Stash and reapply changes" ;
474470 const CHECKOUT_OPTION_UNCHANGE : & str =
@@ -484,9 +480,7 @@ impl CheckoutOptions {
484480 Self :: Unchange => {
485481 ( "Don't change" , CHECKOUT_OPTION_UNCHANGE )
486482 }
487- Self :: Discard => {
488- ( "Discard" , CHECKOUT_OPTION_DISCARD )
489- }
483+ Self :: Discard => ( "Discard" , CHECKOUT_OPTION_DISCARD ) ,
490484 }
491485 }
492486}
0 commit comments