Skip to content

Commit cdd0366

Browse files
committed
fix: use module-level #![allow] for Zeroize derive lint
Field-level #[allow(unused_assignments)] doesn't propagate to derive macro generated code. Module-level #![allow] at top of file works.
1 parent b33ed3d commit cdd0366

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/encryption/key_derivation.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
//! to prevent key confusion attacks and ensure cryptographic isolation between different
99
//! uses of the same master key.
1010
11+
// Zeroize derive macro generates code that triggers false positive unused_assignments
12+
// lint in Rust 1.92+ for #[zeroize(skip)] fields. The TenantKeys.tenant_id field IS read.
13+
#![allow(unused_assignments)]
14+
1115
use hkdf::Hkdf;
1216
use sha2::Sha256;
1317
use thiserror::Error;

src/encryption/key_rotation.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
//! - Write only with new key (migration forward)
66
//! - Key version bytes in ciphertext header track which key was used
77
8+
// Zeroize derive macro generates code that triggers false positive unused_assignments
9+
// lint in Rust 1.92+ for #[zeroize(skip)] fields. The KeyRotationState.rotation_active field IS read.
10+
#![allow(unused_assignments)]
11+
812
use std::convert::TryInto;
913
use zeroize::{Zeroize, ZeroizeOnDrop};
1014

0 commit comments

Comments
 (0)