Skip to content

Commit ce3bf6b

Browse files
authored
Merge pull request #84 from ivmarkov/main
Fix CI by addressing the Clippy warnings
2 parents 227bb77 + 7a601b1 commit ce3bf6b

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

rs-matter/src/acl.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ impl AclEntry {
299299
pub fn new(fab_idx: u8, privilege: Privilege, auth_mode: AuthMode) -> Self {
300300
const INIT_SUBJECTS: Option<u64> = None;
301301
const INIT_TARGETS: Option<Target> = None;
302-
let privilege = privilege;
302+
303303
Self {
304304
fab_idx: Some(fab_idx),
305305
privilege,

rs-matter/src/secure_channel/case.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ impl<'a> Case<'a> {
9090
async fn handle_casesigma3(
9191
&mut self,
9292
exchange: &mut Exchange<'_>,
93-
rx: &mut Packet<'_>,
93+
rx: &Packet<'_>,
9494
tx: &mut Packet<'_>,
9595
case_session: &mut CaseSession,
9696
) -> Result<(), Error> {

rs-matter/src/secure_channel/pake.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ impl<'a> Pake<'a> {
158158
async fn handle_pasepake3(
159159
&mut self,
160160
exchange: &mut Exchange<'_>,
161-
rx: &mut Packet<'_>,
161+
rx: &Packet<'_>,
162162
tx: &mut Packet<'_>,
163163
mdns: &dyn Mdns,
164164
spake2p: &mut Spake2P,

rs-matter/src/transport/exchange.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ impl<'a> ExchangeCtr<'a> {
9090
self.exchange.id()
9191
}
9292

93+
#[allow(clippy::all)]
94+
// Should be #[allow(clippy::needless_pass_by_ref_mut)], but this is only in 1.73 which is not released yet
95+
// rx is actually modified, but via an unsafe `*mut Packet<'static>` and apparently Clippy can't see this
9396
pub async fn get(mut self, rx: &mut Packet<'_>) -> Result<Exchange<'a>, Error> {
9497
let construction_notification = self.construction_notification;
9598

0 commit comments

Comments
 (0)