Skip to content

Commit

Permalink
DHT: fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
styppo authored and nibhar committed Nov 25, 2024
1 parent 78f458a commit 5d3c5e4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions dht/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ impl ValidatorRecordVerifier for Verifier {
// Verify the record.
signed_record
.verify(&public_key)
.then(|| ())
.then_some(())
.ok_or(ValidatorInfoError::InvalidSignature)
}
}
Expand Down Expand Up @@ -108,12 +108,12 @@ impl DhtVerifier for Verifier {

self.verify_validator_record(&validator_record)
.map_err(|_| DhtVerifierError::ValidatorInfoError)
.and_then(|_| {
Ok(DhtRecord::Validator(
.map(|_| {
DhtRecord::Validator(
validator_record.record.peer_id,
validator_record.record,
record.clone(),
))
)
})
}
_ => {
Expand Down

0 comments on commit 5d3c5e4

Please sign in to comment.