Skip to content

Commit 21ffb36

Browse files
committed
Fix unexpected +1.70.0 compiler error
1 parent bc2deb6 commit 21ffb36

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

aws-lc-rs/src/aead.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@
158158
//! let seal_prepared_nonce = sealing_key.prepare_nonce()?;
159159
//!
160160
//! // Query the nonce that will be used for our seal operation with our prepared nonce
161-
//! let seal_nonce_bytes = Vec::from(seal_prepared_nonce.nonce().as_ref());
161+
//! let seal_nonce_bytes = Vec::from(seal_prepared_nonce.nonce().as_ref().as_slice());
162162
//!
163163
//! // Use the prepared nonce and seal the plaintext
164164
//! seal_prepared_nonce.seal_in_place_append_tag(Aad::empty(), &mut in_out)?;
@@ -167,7 +167,7 @@
167167
//! let open_prepared_nonce = opening_key.prepare_nonce()?;
168168
//!
169169
//! // Query the nonce that will be used for our seal operation with our prepared nonce
170-
//! let open_nonce_bytes = Vec::from(open_prepared_nonce.nonce().as_ref());
170+
//! let open_nonce_bytes = Vec::from(open_prepared_nonce.nonce().as_ref().as_slice());
171171
//!
172172
//! // Since we initialized the Counter32Builder the same between both builders the nonce here
173173
//! // will match the one from the opening key.

aws-lc-rs/tests/aead_test.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -694,8 +694,8 @@ fn prepare_nonce() {
694694
for _ in 0..(LIMIT / 2) {
695695
let skpn = sk.prepare_nonce().unwrap();
696696
let okpn = ok.prepare_nonce().unwrap();
697-
let so_nonce = Vec::from(skpn.nonce().as_ref());
698-
let oo_nonce = Vec::from(okpn.nonce().as_ref());
697+
let so_nonce = Vec::from(skpn.nonce().as_ref().as_slice());
698+
let oo_nonce = Vec::from(okpn.nonce().as_ref().as_slice());
699699

700700
assert_eq!(so_nonce.as_slice(), oo_nonce.as_slice());
701701
assert!(!nonces.contains(&so_nonce));
@@ -714,8 +714,8 @@ fn prepare_nonce() {
714714

715715
let so = sk.prepare_nonce().unwrap();
716716
let oo = ok.prepare_nonce().unwrap();
717-
let so_nonce = Vec::from(so.nonce().as_ref());
718-
let oo_nonce = Vec::from(oo.nonce().as_ref());
717+
let so_nonce = Vec::from(so.nonce().as_ref().as_slice());
718+
let oo_nonce = Vec::from(oo.nonce().as_ref().as_slice());
719719

720720
assert_eq!(so_nonce.as_slice(), oo_nonce.as_slice());
721721
assert!(!nonces.contains(&so_nonce));

0 commit comments

Comments
 (0)