@@ -121,19 +121,19 @@ pub enum Ctap2PublicKeyCredentialType {
121121#[ derive( Debug , Clone , Copy , PartialEq , Serialize , Deserialize ) ]
122122#[ serde( rename_all = "lowercase" ) ]
123123pub enum Ctap2Transport {
124- BLE ,
125- NFC ,
126- USB ,
127- INTERNAL ,
124+ Ble ,
125+ Nfc ,
126+ Usb ,
127+ Internal ,
128128}
129129
130130impl From < & Ctap1Transport > for Ctap2Transport {
131131 fn from ( ctap1 : & Ctap1Transport ) -> Ctap2Transport {
132132 match ctap1 {
133- Ctap1Transport :: BT => Ctap2Transport :: BLE ,
134- Ctap1Transport :: BLE => Ctap2Transport :: BLE ,
135- Ctap1Transport :: USB => Ctap2Transport :: USB ,
136- Ctap1Transport :: NFC => Ctap2Transport :: NFC ,
133+ Ctap1Transport :: Bt => Ctap2Transport :: Ble ,
134+ Ctap1Transport :: Ble => Ctap2Transport :: Ble ,
135+ Ctap1Transport :: Usb => Ctap2Transport :: Usb ,
136+ Ctap1Transport :: Nfc => Ctap2Transport :: Nfc ,
137137 }
138138 }
139139}
@@ -211,13 +211,13 @@ pub enum Ctap2UserVerificationOperation {
211211mod tests {
212212 use crate :: proto:: ctap2:: Ctap2PublicKeyCredentialDescriptor ;
213213
214- use super :: { Ctap2CredentialType , Ctap2COSEAlgorithmIdentifier , Ctap2PublicKeyCredentialType } ;
214+ use super :: { Ctap2COSEAlgorithmIdentifier , Ctap2CredentialType , Ctap2PublicKeyCredentialType } ;
215+ use hex;
215216 use serde_bytes:: ByteBuf ;
216217 use serde_cbor;
217- use hex;
218218
219219 #[ test]
220- /// Verify CBOR serialization conforms to CTAP canonical standard, including ordering (see #95)
220+ /// Verify CBOR serialization conforms to CTAP canonical standard, including ordering (see #95)
221221 pub fn credential_type_field_serialization ( ) {
222222 let credential_type = Ctap2CredentialType {
223223 algorithm : Ctap2COSEAlgorithmIdentifier :: ES256 ,
@@ -230,7 +230,7 @@ mod tests {
230230 }
231231
232232 #[ test]
233- /// Verify CBOR serialization conforms to CTAP canonical standard, including ordering (see #95)
233+ /// Verify CBOR serialization conforms to CTAP canonical standard, including ordering (see #95)
234234 pub fn credential_descriptor_serialization ( ) {
235235 let credential_descriptor = Ctap2PublicKeyCredentialDescriptor {
236236 id : ByteBuf :: from ( vec ! [ 0x42 ] ) ,
@@ -242,4 +242,4 @@ mod tests {
242242 let expected = hex:: decode ( "a2626964414264747970656a7075626c69632d6b6579" ) . unwrap ( ) ;
243243 assert_eq ! ( serialized, expected) ;
244244 }
245- }
245+ }
0 commit comments