@@ -203,9 +203,9 @@ impl<'de, T: DeserializeOwned> Deserialize<'de> for AuthenticatorData<T> {
203203 . read_u8 ( )
204204 . map_err ( |e| DesError :: custom ( format ! ( "failed to read flags: {e}" ) ) ) ?;
205205 let flags = AuthenticatorDataFlags :: from_bits_truncate ( flags_raw) ;
206- let signature_count = cursor
207- . read_u32 :: < BigEndian > ( )
208- . map_err ( |e| DesError :: custom ( format ! ( "failed to read signature_count: {e}" ) ) ) ?;
206+ let signature_count = cursor. read_u32 :: < BigEndian > ( ) . map_err ( |e| {
207+ DesError :: custom ( format ! ( "failed to read signature_count: {e}" ) )
208+ } ) ?;
209209
210210 let attested_credential =
211211 if flags. contains ( AuthenticatorDataFlags :: ATTESTED_CREDENTIALS ) {
@@ -218,17 +218,16 @@ impl<'de, T: DeserializeOwned> Deserialize<'de> for AuthenticatorData<T> {
218218 cursor
219219 . read_exact ( & mut aaguid)
220220 . map_err ( |e| DesError :: custom ( format ! ( "failed to read aaguid: {e}" ) ) ) ?;
221- let credential_id_len = cursor
222- . read_u16 :: < BigEndian > ( )
223- . map_err ( |e| DesError :: custom ( format ! ( "failed to read credential_id_len: {e}" ) ) ) ?
224- as usize ;
221+ let credential_id_len = cursor. read_u16 :: < BigEndian > ( ) . map_err ( |e| {
222+ DesError :: custom ( format ! ( "failed to read credential_id_len: {e}" ) )
223+ } ) ? as usize ;
225224 if data. len ( ) < 55 + credential_id_len {
226225 return Err ( DesError :: invalid_length ( data. len ( ) , & "55+L" ) ) ;
227226 }
228227 let mut credential_id = vec ! [ 0u8 ; credential_id_len] ;
229- cursor
230- . read_exact ( & mut credential_id)
231- . map_err ( |e| DesError :: custom ( format ! ( "failed to read credential_id: {e}" ) ) ) ?;
228+ cursor. read_exact ( & mut credential_id ) . map_err ( |e| {
229+ DesError :: custom ( format ! ( "failed to read credential_id: {e}" ) )
230+ } ) ?;
232231
233232 let credential_public_key: PublicKey =
234233 cbor:: from_cursor ( & mut cursor) . map_err ( DesError :: custom) ?;
0 commit comments