Skip to content

Commit 277ffda

Browse files
committed
x-wing: move lint configuration to lib.rs
This is more consistent with the rest of the projects in the @RustCrypto organization
1 parent de49bf1 commit 277ffda

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

Diff for: ml-kem/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
html_logo_url = "https://raw.githubusercontent.com/RustCrypto/meta/master/logo.svg",
66
html_favicon_url = "https://raw.githubusercontent.com/RustCrypto/meta/master/logo.svg"
77
)]
8-
#![warn(clippy::pedantic)] // Be pedantic by default
9-
#![warn(clippy::integer_division_remainder_used)] // Be judicious about using `/` and `%`
108
#![allow(non_snake_case)] // Allow notation matching the spec
119
#![allow(clippy::clone_on_copy)] // Be explicit about moving data
1210
#![deny(missing_docs)] // Require all public interfaces to be documented
11+
#![warn(clippy::pedantic)] // Be pedantic by default
12+
#![warn(clippy::integer_division_remainder_used)] // Be judicious about using `/` and `%`
1313

1414
//! # Usage
1515
//!

Diff for: x-wing/Cargo.toml

-7
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,6 @@ exclude = ["src/test-vectors.json"]
1818
getrandom = ["rand_core/getrandom"]
1919
zeroize = ["dep:zeroize", "ml-kem/zeroize", "x25519-dalek/zeroize"]
2020

21-
[lints.clippy]
22-
pedantic = "warn" # Be pedantic by default
23-
similar_names = { level = "allow", priority = 1 } # So we can use the names as in the RFC
24-
25-
[lints.rust]
26-
missing_docs = "deny" # Require all public interfaces to be documented
27-
2821
[dependencies]
2922
rand_core = { version = "0.6", default-features = false }
3023
x25519-dalek = { version = "2.0", default-features = false, features = ["static_secrets"] }

Diff for: x-wing/src/lib.rs

+3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
html_logo_url = "https://raw.githubusercontent.com/RustCrypto/meta/master/logo.svg",
66
html_favicon_url = "https://raw.githubusercontent.com/RustCrypto/meta/master/logo.svg"
77
)]
8+
#![deny(missing_docs)]
9+
#![warn(clippy::pedantic)]
810

911
//! # Usage
1012
//!
@@ -133,6 +135,7 @@ pub struct DecapsulationKey {
133135
impl Decapsulate<Ciphertext, SharedSecret> for DecapsulationKey {
134136
type Error = Infallible;
135137

138+
#[allow(clippy::similar_names)] // So we can use the names as in the RFC
136139
fn decapsulate(&self, ct: &Ciphertext) -> Result<SharedSecret, Self::Error> {
137140
let (sk_m, sk_x, _pk_m, pk_x) = self.expand_key();
138141
let ss_m = sk_m.decapsulate(&ct.ct_m)?;

0 commit comments

Comments
 (0)