Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CI by addressing the Clippy warnings #84

Merged
merged 1 commit into from
Aug 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading