diff --git a/boost_manager/src/updater.rs b/boost_manager/src/updater.rs index 22eafda50..1b5be1310 100644 --- a/boost_manager/src/updater.rs +++ b/boost_manager/src/updater.rs @@ -173,7 +173,7 @@ where Ok(()) } - async fn confirm_txn<'a>(&self, txn_row: &TxnRow) -> Result<()> { + async fn confirm_txn(&self, txn_row: &TxnRow) -> Result<()> { if self.solana.confirm_transaction(&txn_row.txn_id).await? { tracing::info!("txn_id {} confirmed on chain, updated db", txn_row.txn_id); db::update_verified_txns_onchain(&self.pool, &txn_row.txn_id).await? diff --git a/file_store/src/file_sink.rs b/file_store/src/file_sink.rs index 771754e90..d2ee9d9ef 100644 --- a/file_store/src/file_sink.rs +++ b/file_store/src/file_sink.rs @@ -676,7 +676,7 @@ mod tests { .file_name() .to_str() .and_then(|file_name| FileInfo::from_str(file_name).ok()) - .map_or(false, |file_info| { + .is_some_and(|file_info| { FileType::from_str(&file_info.prefix).expect("entropy report prefix") == FileType::EntropyReport }) diff --git a/iot_config/src/route_service.rs b/iot_config/src/route_service.rs index 349933271..ec5c78e58 100644 --- a/iot_config/src/route_service.rs +++ b/iot_config/src/route_service.rs @@ -63,11 +63,11 @@ impl RouteService { self.update_channel.clone() } - async fn verify_request_signature<'a, R>( + async fn verify_request_signature( &self, signer: &PublicKey, request: &R, - id: OrgId<'a>, + id: OrgId<'_>, ) -> Result<(), Status> where R: MsgVerify, @@ -117,11 +117,11 @@ impl RouteService { } } - async fn verify_request_signature_or_stream<'a, R>( + async fn verify_request_signature_or_stream( &self, signer: &PublicKey, request: &R, - id: OrgId<'a>, + id: OrgId<'_>, ) -> Result<(), Status> where R: MsgVerify, @@ -151,9 +151,9 @@ impl RouteService { DevAddrEuiValidator::new(route_id, admin_keys, &self.pool, check_constraints).await } - async fn validate_skf_devaddrs<'a>( + async fn validate_skf_devaddrs( &self, - route_id: &'a str, + route_id: &'_ str, updates: &[route_skf_update_req_v1::RouteSkfUpdateV1], ) -> Result<(), Status> { let ranges: Vec = route::list_devaddr_ranges_for_route(route_id, &self.pool) diff --git a/iot_verifier/src/runner.rs b/iot_verifier/src/runner.rs index 5b1092c8d..98d0f06f6 100644 --- a/iot_verifier/src/runner.rs +++ b/iot_verifier/src/runner.rs @@ -514,7 +514,7 @@ where .witness_updater .get_last_witness(&beacon_report.report.pub_key) .await?; - Ok(last_witness.map_or(false, |lw| { + Ok(last_witness.is_some_and(|lw| { beacon_report.received_timestamp - lw.timestamp < *RECIPROCITY_WINDOW })) } @@ -544,9 +544,8 @@ where ) -> anyhow::Result { let last_beacon_recip = LastBeaconReciprocity::get(&self.pool, &report.report.pub_key).await?; - Ok(last_beacon_recip.map_or(false, |lw| { - report.received_timestamp - lw.timestamp < *RECIPROCITY_WINDOW - })) + Ok(last_beacon_recip + .is_some_and(|lw| report.received_timestamp - lw.timestamp < *RECIPROCITY_WINDOW)) } } diff --git a/mobile_verifier/src/coverage.rs b/mobile_verifier/src/coverage.rs index 5ef717084..a8dce5ddd 100644 --- a/mobile_verifier/src/coverage.rs +++ b/mobile_verifier/src/coverage.rs @@ -547,11 +547,11 @@ impl CoverageClaimTimeCache { Self { cache } } - pub async fn fetch_coverage_claim_time<'a, 'b>( + pub async fn fetch_coverage_claim_time( &self, - radio_key: KeyType<'a>, - coverage_object: &'a Option, - exec: &mut Transaction<'b, Postgres>, + radio_key: KeyType<'_>, + coverage_object: &'_ Option, + exec: &mut Transaction<'_, Postgres>, ) -> Result>, sqlx::Error> { let key = (radio_key.to_id(), *coverage_object); if let Some(coverage_claim_time) = self.cache.get(&key).await { diff --git a/mobile_verifier/src/data_session.rs b/mobile_verifier/src/data_session.rs index 7f1940777..f8bc9a529 100644 --- a/mobile_verifier/src/data_session.rs +++ b/mobile_verifier/src/data_session.rs @@ -215,7 +215,7 @@ pub async fn sum_data_sessions_to_dc_by_payer<'a>( .collect::>()) } -pub async fn data_sessions_to_dc<'a>( +pub async fn data_sessions_to_dc( stream: impl Stream>, ) -> Result { tokio::pin!(stream); diff --git a/mobile_verifier/src/speedtests.rs b/mobile_verifier/src/speedtests.rs index 5ed549c47..746e98a8a 100644 --- a/mobile_verifier/src/speedtests.rs +++ b/mobile_verifier/src/speedtests.rs @@ -275,7 +275,7 @@ pub async fn get_latest_speedtests_for_pubkey( Ok(speedtests) } -pub async fn aggregate_epoch_speedtests<'a>( +pub async fn aggregate_epoch_speedtests( epoch_end: DateTime, exec: &sqlx::Pool, ) -> Result {