Skip to content

Commit f808c3a

Browse files
committed
dhkem: enable and fix lints
Enables the workspace-level lint config added in #232
1 parent eb944d5 commit f808c3a

File tree

4 files changed

+11
-1
lines changed

4 files changed

+11
-1
lines changed

dhkem/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ p521 = ["dep:p521", "ecdh"]
4444
x25519 = ["dep:x25519", "x25519/static_secrets"]
4545
zeroize = ["dep:zeroize"]
4646

47+
[lints]
48+
workspace = true
49+
4750
[package.metadata.docs.rs]
4851
all-features = true
4952
rustdoc-args = ["--cfg", "docsrs"]

dhkem/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ where
127127
#[cfg(feature = "zeroize")]
128128
impl<DK: Zeroize, EK> Zeroize for DecapsulationKey<DK, EK> {
129129
fn zeroize(&mut self) {
130-
self.dk.zeroize()
130+
self.dk.zeroize();
131131
}
132132
}
133133

dhkem/tests/hpke_p256_test.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1+
//! HPKE tests (P-256 only)
2+
13
#![cfg(feature = "p256")]
4+
#![allow(clippy::unwrap_in_result, reason = "tests")]
5+
#![allow(clippy::unwrap_used, reason = "tests")]
26

37
use core::convert::Infallible;
48
use dhkem::NistP256DecapsulationKey;

dhkem/tests/tests.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1+
//! DHKEM tests.
2+
13
#![cfg(any(
24
feature = "k256",
35
feature = "p256",
46
feature = "p384",
57
feature = "p521",
68
feature = "x25519"
79
))]
10+
#![allow(clippy::unwrap_used, reason = "tests")]
811

912
use kem::{Encapsulate, Generate, Kem, TryDecapsulate};
1013

0 commit comments

Comments
 (0)