Skip to content

Commit

Permalink
make latest version of clippy happy
Browse files Browse the repository at this point in the history
  • Loading branch information
andymck committed Jan 2, 2024
1 parent fb698b0 commit b1b818c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 15 deletions.
15 changes: 3 additions & 12 deletions iot_verifier/src/reward_share.rs
Original file line number Diff line number Diff line change
Expand Up @@ -559,10 +559,7 @@ mod test {
.collect();
for reward in gw_reward_shares {
if let Some(ProtoReward::GatewayReward(gateway_reward)) = reward.reward {
rewards.insert(
gateway_reward.hotspot_key.clone().try_into().unwrap(),
gateway_reward,
);
rewards.insert(gateway_reward.hotspot_key.clone().into(), gateway_reward);
}
}

Expand Down Expand Up @@ -743,10 +740,7 @@ mod test {
.collect();
for reward in gw_reward_shares {
if let Some(ProtoReward::GatewayReward(gateway_reward)) = reward.reward {
rewards.insert(
gateway_reward.hotspot_key.clone().try_into().unwrap(),
gateway_reward,
);
rewards.insert(gateway_reward.hotspot_key.clone().into(), gateway_reward);
}
}

Expand Down Expand Up @@ -911,10 +905,7 @@ mod test {
.collect();
for reward in gw_reward_shares {
if let Some(ProtoReward::GatewayReward(gateway_reward)) = reward.reward {
rewards.insert(
gateway_reward.hotspot_key.clone().try_into().unwrap(),
gateway_reward,
);
rewards.insert(gateway_reward.hotspot_key.clone().into(), gateway_reward);
}
}

Expand Down
2 changes: 1 addition & 1 deletion iot_verifier/src/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ mod tests {
assert_eq!(1, included_witnesses.len());
assert_eq!(
InvalidReason::Stale,
excluded_witnesses.get(0).unwrap().invalid_reason
excluded_witnesses.first().unwrap().invalid_reason
);
assert_eq!(
InvalidReason::Duplicate,
Expand Down
2 changes: 1 addition & 1 deletion mobile_config_cli/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ impl AuthClient {
keypair: &Keypair,
) -> Result<Vec<PublicKey>> {
let mut request = AuthorizationListReqV1 {
role: role.try_into()?,
role: role.into(),
signer: keypair.public_key().into(),
signature: vec![],
};
Expand Down
2 changes: 1 addition & 1 deletion mobile_verifier/src/speedtests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ where
speedtest_report: CellSpeedtestIngestReport,
result: SpeedtestVerificationResult,
) -> anyhow::Result<()> {
let ingest_report: SpeedtestIngestReportV1 = speedtest_report.try_into()?;
let ingest_report: SpeedtestIngestReportV1 = speedtest_report.into();
let timestamp: u64 = Utc::now().timestamp_millis() as u64;
let proto = VerifiedSpeedtestProto {
report: Some(ingest_report),
Expand Down

0 comments on commit b1b818c

Please sign in to comment.