diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 02:49:42 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 02:49:42 +0000 |
commit | 837b550238aa671a591ccf282dddeab29cadb206 (patch) | |
tree | 914b6b8862bace72bd3245ca184d374b08d8a672 /vendor/der/tests | |
parent | Adding debian version 1.70.0+dfsg2-1. (diff) | |
download | rustc-837b550238aa671a591ccf282dddeab29cadb206.tar.xz rustc-837b550238aa671a591ccf282dddeab29cadb206.zip |
Merging upstream version 1.71.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/der/tests')
-rw-r--r-- | vendor/der/tests/derive.rs | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/vendor/der/tests/derive.rs b/vendor/der/tests/derive.rs index dac14f816..cb6fe183d 100644 --- a/vendor/der/tests/derive.rs +++ b/vendor/der/tests/derive.rs @@ -48,9 +48,8 @@ mod choice { } } - const UTC_TIMESTAMP_DER: &'static [u8] = - &hex!("17 0d 39 31 30 35 30 36 32 33 34 35 34 30 5a"); - const GENERAL_TIMESTAMP_DER: &'static [u8] = + const UTC_TIMESTAMP_DER: &[u8] = &hex!("17 0d 39 31 30 35 30 36 32 33 34 35 34 30 5a"); + const GENERAL_TIMESTAMP_DER: &[u8] = &hex!("18 0f 31 39 39 31 30 35 30 36 32 33 34 35 34 30 5a"); #[test] @@ -116,8 +115,8 @@ mod choice { } } - const BITSTRING_DER: &'static [u8] = &hex!("80 04 00 01 02 03"); - const TIME_DER: &'static [u8] = &hex!("81 0f 31 39 39 31 30 35 30 36 32 33 34 35 34 30 5a"); + const BITSTRING_DER: &[u8] = &hex!("80 04 00 01 02 03"); + const TIME_DER: &[u8] = &hex!("81 0f 31 39 39 31 30 35 30 36 32 33 34 35 34 30 5a"); #[test] fn decode() { @@ -432,8 +431,7 @@ mod sequence { #[test] fn decode() { - let algorithm_identifier = - AlgorithmIdentifier::from_der(&ALGORITHM_IDENTIFIER_DER).unwrap(); + let algorithm_identifier = AlgorithmIdentifier::from_der(ALGORITHM_IDENTIFIER_DER).unwrap(); assert_eq!(ID_EC_PUBLIC_KEY_OID, algorithm_identifier.algorithm); assert_eq!( @@ -453,7 +451,7 @@ mod sequence { assert_eq!( ALGORITHM_IDENTIFIER_DER, - algorithm_identifier.to_vec().unwrap() + algorithm_identifier.to_der().unwrap() ); } } |