diff --git a/rs-matter/src/acl.rs b/rs-matter/src/acl.rs index 15e4def5..3209c4b1 100644 --- a/rs-matter/src/acl.rs +++ b/rs-matter/src/acl.rs @@ -299,7 +299,7 @@ impl AclEntry { pub fn new(fab_idx: u8, privilege: Privilege, auth_mode: AuthMode) -> Self { const INIT_SUBJECTS: Option = None; const INIT_TARGETS: Option = None; - let privilege = privilege; + Self { fab_idx: Some(fab_idx), privilege, diff --git a/rs-matter/src/secure_channel/case.rs b/rs-matter/src/secure_channel/case.rs index 090e989e..155dfbf8 100644 --- a/rs-matter/src/secure_channel/case.rs +++ b/rs-matter/src/secure_channel/case.rs @@ -90,7 +90,7 @@ impl<'a> Case<'a> { async fn handle_casesigma3( &mut self, exchange: &mut Exchange<'_>, - rx: &mut Packet<'_>, + rx: &Packet<'_>, tx: &mut Packet<'_>, case_session: &mut CaseSession, ) -> Result<(), Error> { diff --git a/rs-matter/src/secure_channel/pake.rs b/rs-matter/src/secure_channel/pake.rs index 947b32f4..638e93ef 100644 --- a/rs-matter/src/secure_channel/pake.rs +++ b/rs-matter/src/secure_channel/pake.rs @@ -158,7 +158,7 @@ impl<'a> Pake<'a> { async fn handle_pasepake3( &mut self, exchange: &mut Exchange<'_>, - rx: &mut Packet<'_>, + rx: &Packet<'_>, tx: &mut Packet<'_>, mdns: &dyn Mdns, spake2p: &mut Spake2P, diff --git a/rs-matter/src/transport/exchange.rs b/rs-matter/src/transport/exchange.rs index 585e458a..d4d28b23 100644 --- a/rs-matter/src/transport/exchange.rs +++ b/rs-matter/src/transport/exchange.rs @@ -90,6 +90,9 @@ impl<'a> ExchangeCtr<'a> { self.exchange.id() } + #[allow(clippy::all)] + // Should be #[allow(clippy::needless_pass_by_ref_mut)], but this is only in 1.73 which is not released yet + // rx is actually modified, but via an unsafe `*mut Packet<'static>` and apparently Clippy can't see this pub async fn get(mut self, rx: &mut Packet<'_>) -> Result, Error> { let construction_notification = self.construction_notification;