Merge pull request #84 from ivmarkov/main

Fix CI by addressing the Clippy warnings
This commit is contained in:
Kedar Sovani 2023-08-04 06:43:55 +05:30 committed by GitHub
commit ce3bf6b6fb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 3 deletions

View file

@ -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,

View file

@ -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> {

View file

@ -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,

View file

@ -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;