@@ -373,7 +373,7 @@ impl From<&crate::model::UsbState> for Structure<'_> {
373373 ( 0x06 , Some ( Value :: I32 ( num) ) )
374374 }
375375 crate :: model:: UsbState :: NeedsUserPresence => ( 0x07 , None ) ,
376- crate :: model:: UsbState :: SelectCredential { creds } => {
376+ crate :: model:: UsbState :: SelectingCredential { creds } => {
377377 let creds: Vec < Credential > = creds. iter ( ) . map ( Credential :: from) . collect ( ) ;
378378 let value = Value :: new ( creds) ;
379379 ( 0x08 , Some ( value) )
@@ -430,7 +430,7 @@ impl TryFrom<&Structure<'_>> for crate::model::UsbState {
430430 cred
431431 } )
432432 . collect ( ) ;
433- Ok ( Self :: SelectCredential { creds : creds? } )
433+ Ok ( Self :: SelectingCredential { creds : creds? } )
434434 }
435435 0x09 => Ok ( Self :: Completed ) ,
436436 0x0A => {
@@ -498,7 +498,7 @@ impl From<&crate::model::NfcState> for Structure<'_> {
498498 } ;
499499 ( 0x06 , Some ( Value :: I32 ( num) ) )
500500 }
501- crate :: model:: NfcState :: SelectCredential { creds } => {
501+ crate :: model:: NfcState :: SelectingCredential { creds } => {
502502 let creds: Vec < Credential > = creds. iter ( ) . map ( Credential :: from) . collect ( ) ;
503503 let value = Value :: new ( creds) ;
504504 ( 0x08 , Some ( value) )
@@ -553,7 +553,7 @@ impl TryFrom<&Structure<'_>> for crate::model::NfcState {
553553 cred
554554 } )
555555 . collect ( ) ;
556- Ok ( Self :: SelectCredential { creds : creds? } )
556+ Ok ( Self :: SelectingCredential { creds : creds? } )
557557 }
558558 0x09 => Ok ( Self :: Completed ) ,
559559 0x0A => {
@@ -829,14 +829,14 @@ mod test {
829829 username: None ,
830830 } ,
831831 ] ;
832- let state = UsbState :: SelectCredential { creds } ;
832+ let state = UsbState :: SelectingCredential { creds } ;
833833 let ctx = zvariant:: serialized:: Context :: new_dbus ( zvariant:: BE , 0 ) ;
834834 let data = zvariant:: to_bytes ( ctx, & state) . unwrap ( ) ;
835835 assert_eq ! ( "(yv)" , UsbState :: SIGNATURE . to_string( ) ) ;
836836
837837 #[ rustfmt:: skip]
838838 let expected = [
839- 8 , // UsbState::SelectCredential
839+ 8 , // UsbState::SelectingCredential
840840 6 , 97 , 97 , 123 , 115 , 118 , 125 , 0 , 0 , 0 , 0 , // Signature aa{sv} + padding
841841 0 , 0 , 0 , 165 , // array(struct) data length
842842 0 , 0 , 0 , 83 , 0 , 0 , 0 , 0 , // element 1(struct) length, + padding(4)
@@ -868,7 +868,7 @@ mod test {
868868 fn test_deserialize_usb_state ( ) {
869869 #[ rustfmt:: skip]
870870 let input = [
871- 8 , // UsbState::SelectCredential
871+ 8 , // UsbState::SelectingCredential
872872 6 , 97 , 97 , 123 , 115 , 118 , 125 , 0 , 0 , 0 , 0 , // Signature aa{sv} + padding
873873 0 , 0 , 0 , 165 , // array(struct) data length
874874 0 , 0 , 0 , 83 , 0 , 0 , 0 , 0 , // element 1(struct) length, + padding(4)
@@ -897,7 +897,7 @@ mod test {
897897 let data = Data :: new ( & input, ctx) ;
898898 let state: UsbState = data. deserialize ( ) . unwrap ( ) . 0 ;
899899 match state {
900- UsbState :: SelectCredential { creds } => {
900+ UsbState :: SelectingCredential { creds } => {
901901 assert_eq ! ( 2 , creds. len( ) ) ;
902902 assert_eq ! ( "a1b2c3" , creds[ 0 ] . id, ) ;
903903 assert_eq ! ( "user 1" , creds[ 0 ] . name, ) ;
0 commit comments