Skip to content

Commit

Permalink
Merge pull request project-chip#84 from ivmarkov/main
Browse files Browse the repository at this point in the history
Fix CI by addressing the Clippy warnings
  • Loading branch information
kedars authored Aug 4, 2023
2 parents 227bb77 + 7a601b1 commit ce3bf6b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion rs-matter/src/acl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ impl AclEntry {
pub fn new(fab_idx: u8, privilege: Privilege, auth_mode: AuthMode) -> Self {
const INIT_SUBJECTS: Option<u64> = None;
const INIT_TARGETS: Option<Target> = None;
let privilege = privilege;

Self {
fab_idx: Some(fab_idx),
privilege,
Expand Down
2 changes: 1 addition & 1 deletion rs-matter/src/secure_channel/case.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down
2 changes: 1 addition & 1 deletion rs-matter/src/secure_channel/pake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 3 additions & 0 deletions rs-matter/src/transport/exchange.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Exchange<'a>, Error> {
let construction_notification = self.construction_notification;

Expand Down

0 comments on commit ce3bf6b

Please sign in to comment.