Skip to content

Commit 20ae48b

Browse files
authored
aead: enable missing_debug_implementations lint and add Debug impls (#1411)
1 parent 43d620d commit 20ae48b

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

aead/src/lib.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@
66
html_favicon_url = "https://raw.githubusercontent.com/RustCrypto/media/8f1a9894/logo.svg"
77
)]
88
#![forbid(unsafe_code)]
9-
#![warn(clippy::unwrap_used, missing_docs, rust_2018_idioms)]
9+
#![warn(
10+
clippy::unwrap_used,
11+
missing_docs,
12+
rust_2018_idioms,
13+
missing_debug_implementations
14+
)]
1015

1116
#[cfg(feature = "alloc")]
1217
extern crate alloc;
@@ -472,6 +477,7 @@ impl<Alg: AeadInPlace> AeadMutInPlace for Alg {
472477
/// If you don't care about AAD, you can pass a `&[u8]` as the payload to
473478
/// `encrypt`/`decrypt` and it will automatically be coerced to this type.
474479
#[cfg(feature = "alloc")]
480+
#[derive(Debug)]
475481
pub struct Payload<'msg, 'aad> {
476482
/// Message to be encrypted/decrypted
477483
pub msg: &'msg [u8],

aead/src/stream.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ macro_rules! impl_stream_object {
199199
#[doc = "[Online Authenticated-Encryption and its Nonce-Reuse Misuse-Resistance][1]."]
200200
#[doc = ""]
201201
#[doc = "[1]: https://eprint.iacr.org/2015/189.pdf"]
202+
#[derive(Debug)]
202203
pub struct $name<A, S>
203204
where
204205
A: AeadInPlace,
@@ -361,6 +362,7 @@ impl_stream_object!(
361362
/// the last 5-bytes of the AEAD nonce.
362363
///
363364
/// [1]: https://eprint.iacr.org/2015/189.pdf
365+
#[derive(Debug)]
364366
pub struct StreamBE32<A>
365367
where
366368
A: AeadInPlace,
@@ -450,6 +452,7 @@ where
450452
/// when interpreted as a 32-bit integer.
451453
///
452454
/// The 31-bit + 1-bit value is stored as the last 4 bytes of the AEAD nonce.
455+
#[derive(Debug)]
453456
pub struct StreamLE31<A>
454457
where
455458
A: AeadInPlace,

0 commit comments

Comments
 (0)