File tree Expand file tree Collapse file tree 1 file changed +20
-4
lines changed Expand file tree Collapse file tree 1 file changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -422,11 +422,27 @@ fn test_openssl_crl_parse() {
422
422
423
423
// The properties of the CRL should match expected.
424
424
let openssl_issuer = X509 :: from_der ( issuer. der ( ) ) . unwrap ( ) ;
425
- let expected_last_update =
426
- Asn1Time :: from_unix ( crl. params ( ) . this_update . unix_timestamp ( ) ) . unwrap ( ) ;
425
+ // Asn1Time::from_unix takes i64 or i32 (depending on CPU architecture)
426
+ #[ allow( clippy:: useless_conversion) ]
427
+ let expected_last_update = Asn1Time :: from_unix (
428
+ crl. params ( )
429
+ . this_update
430
+ . unix_timestamp ( )
431
+ . try_into ( )
432
+ . unwrap ( ) ,
433
+ )
434
+ . unwrap ( ) ;
427
435
assert ! ( openssl_crl. last_update( ) . eq( & expected_last_update) ) ;
428
- let expected_next_update =
429
- Asn1Time :: from_unix ( crl. params ( ) . next_update . unix_timestamp ( ) ) . unwrap ( ) ;
436
+ // Asn1Time::from_unix takes i64 or i32 (depending on CPU architecture)
437
+ #[ allow( clippy:: useless_conversion) ]
438
+ let expected_next_update = Asn1Time :: from_unix (
439
+ crl. params ( )
440
+ . next_update
441
+ . unix_timestamp ( )
442
+ . try_into ( )
443
+ . unwrap ( ) ,
444
+ )
445
+ . unwrap ( ) ;
430
446
assert ! ( openssl_crl. next_update( ) . unwrap( ) . eq( & expected_next_update) ) ;
431
447
assert ! ( matches!(
432
448
openssl_crl
You can’t perform that action at this time.
0 commit comments