From 7e82a4fb11d4ea595b680a9d25b1a807a479d7ae Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Mon, 23 Mar 2026 13:41:45 +0100 Subject: [PATCH] Remove unused associated constant Aead::AEAD_ID in normal builds This fixes a new compiler warning. --- src/hpke.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/hpke.rs b/src/hpke.rs index 7d61ad5..d1bca6d 100644 --- a/src/hpke.rs +++ b/src/hpke.rs @@ -122,11 +122,13 @@ trait Aead: TagSize = ::TagSize, > { + #[cfg(test)] const AEAD_ID: u16; const X25519_HKDF_SHA256_SELF_HPKE_SUITE_ID: &'static [u8]; } impl Aead for ChaCha20Poly1305 { + #[cfg(test)] const AEAD_ID: u16 = 0x0003; const X25519_HKDF_SHA256_SELF_HPKE_SUITE_ID: &'static [u8] = X25519_HKDF_SHA256_CHACHA20_POLY1305_HPKE_SUITE_ID; @@ -134,6 +136,7 @@ impl Aead for ChaCha20Poly1305 { impl Aead for ChaCha8Poly1305 { /// Custom non-standard Id + #[cfg(test)] const AEAD_ID: u16 = 0xFFFE; const X25519_HKDF_SHA256_SELF_HPKE_SUITE_ID: &'static [u8] = b"HPKE\x00\x20\x00\x01\xFF\xFE"; }