From 5d3c5e46cb590f96a3101b96d202668727c4042e Mon Sep 17 00:00:00 2001 From: styppo Date: Mon, 25 Nov 2024 17:58:56 +0000 Subject: [PATCH] DHT: fix clippy warnings --- dht/src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dht/src/lib.rs b/dht/src/lib.rs index 92e65a53ba..19df588d58 100644 --- a/dht/src/lib.rs +++ b/dht/src/lib.rs @@ -60,7 +60,7 @@ impl ValidatorRecordVerifier for Verifier { // Verify the record. signed_record .verify(&public_key) - .then(|| ()) + .then_some(()) .ok_or(ValidatorInfoError::InvalidSignature) } } @@ -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(), - )) + ) }) } _ => {