Skip to content

Commit 36e01a5

Browse files
committed
Fix compilation errors and warnings
1 parent 945e802 commit 36e01a5

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

aead/src/dyn_aead.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use inout::{InOutBuf, InOutBufReserved};
22

3-
use crate::{Aead, Error, Payload, Result};
3+
use crate::{Aead, Error, Result};
44

55
#[cfg(feature = "alloc")]
66
use alloc::vec::Vec;
@@ -141,14 +141,14 @@ impl<T: Aead> DynAead for T {
141141
#[cfg(feature = "alloc")]
142142
fn encrypt_to_vec(&self, nonce: &[u8], aad: &[u8], msg: &[u8]) -> Result<Vec<u8>> {
143143
let nonce = nonce.try_into().map_err(|_| Error)?;
144-
let payload = Payload { aad, msg };
144+
let payload = crate::Payload { aad, msg };
145145
Aead::encrypt_to_vec(self, nonce, payload)
146146
}
147147

148148
#[cfg(feature = "alloc")]
149149
fn decrypt_to_vec(&self, nonce: &[u8], aad: &[u8], msg: &[u8]) -> Result<Vec<u8>> {
150150
let nonce = nonce.try_into().map_err(|_| Error)?;
151-
let payload = Payload { aad, msg };
151+
let payload = crate::Payload { aad, msg };
152152
Aead::decrypt_to_vec(self, nonce, payload)
153153
}
154154
}

aead/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,7 @@ pub trait Aead {
339339
/// AES-GCM-SIV, ChaCha20Poly1305). [`Aead`] implementations which do not
340340
/// use a postfix tag will need to override this to correctly parse the
341341
/// ciphertext message.
342+
#[cfg(feature = "alloc")]
342343
#[inline]
343344
fn decrypt_to_vec<'msg, 'aad>(
344345
&self,

0 commit comments

Comments
 (0)