diff --git a/src/lib/coapcore/src/scope.rs b/src/lib/coapcore/src/scope.rs index 15483d9aa..7001e59ee 100644 --- a/src/lib/coapcore/src/scope.rs +++ b/src/lib/coapcore/src/scope.rs @@ -15,7 +15,7 @@ pub trait Scope: Sized + core::fmt::Debug + defmt::Format { } impl Scope for core::convert::Infallible { - fn request_is_allowed(&self, request: &M) -> bool { + fn request_is_allowed(&self, _request: &M) -> bool { match *self {} } } @@ -36,7 +36,7 @@ pub trait ScopeGenerator: Sized { impl ScopeGenerator for core::convert::Infallible { type Scope = core::convert::Infallible; - fn from_token_scope(self, bytes: &[u8]) -> Result { + fn from_token_scope(self, _bytes: &[u8]) -> Result { match self {} } } @@ -192,7 +192,7 @@ impl> ScopeGenerator for ParsingAif { .array_iter::<(&str, u32)>() .map_err(|_| InvalidScope)? { - let (path, mask) = item.map_err(|_| InvalidScope)?; + let (path, _mask) = item.map_err(|_| InvalidScope)?; if !path.starts_with("/") { return Err(InvalidScope); } diff --git a/src/lib/coapcore/src/seccfg.rs b/src/lib/coapcore/src/seccfg.rs index 03468ec74..a370dcedd 100644 --- a/src/lib/coapcore/src/seccfg.rs +++ b/src/lib/coapcore/src/seccfg.rs @@ -68,6 +68,10 @@ pub trait ServerSecurityConfig: crate::Sealed { /// Expands an EDHOC `ID_CRED_x` into a parsed `CRED_x` along with the associated /// authorizations. + #[allow( + unused_variables, + reason = "Names are human visible part of API description" + )] fn expand_id_cred_x( &self, id_cred_x: lakers::IdCred, @@ -84,6 +88,10 @@ pub trait ServerSecurityConfig: crate::Sealed { /// /// The default (or any error) renderer produces a generic 4.01 Unauthorized in the handler; /// specifics can be useful in ACE scenarios to return a Request Creation Hint. + #[allow( + unused_variables, + reason = "Names are human visible part of API description" + )] fn render_not_allowed( &self, message: &mut M, @@ -115,7 +123,7 @@ pub enum NullGenerator { impl crate::scope::ScopeGenerator for NullGenerator { type Scope = Scope; - fn from_token_scope(self, bytes: &[u8]) -> Result { + fn from_token_scope(self, _bytes: &[u8]) -> Result { match self { NullGenerator::_Phantom(infallible, _) => match infallible {}, } diff --git a/src/lib/coapcore/src/seccontext.rs b/src/lib/coapcore/src/seccontext.rs index 80b1f56b4..0fbbbbef1 100644 --- a/src/lib/coapcore/src/seccontext.rs +++ b/src/lib/coapcore/src/seccontext.rs @@ -474,7 +474,7 @@ impl< c_r, c_i, }, - authorization: original_authorization, // So far, this is self.nosec_authorization() + .. // Discarding original authorization } = sec_context_state { #[allow(clippy::indexing_slicing, reason = "slice fits by construction")]