Skip to content
This repository was archived by the owner on Mar 23, 2021. It is now read-only.

Commit 8b421f3

Browse files
committed
Satisfy Clippy
Thanks, Clippy.
1 parent 9bb4cad commit 8b421f3

File tree

1 file changed

+4
-4
lines changed
  • cnd/src/btsieve/ethereum

1 file changed

+4
-4
lines changed

cnd/src/btsieve/ethereum/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ where
3636
let (find_parent_queue, next_find_parent) = async_std::sync::channel(5);
3737
let (look_in_the_past_queue, next_look_in_the_past) = async_std::sync::channel(5);
3838

39-
let reference_timestamp = reference_timestamp.map(|timestamp| U256::from(timestamp));
39+
let reference_timestamp = reference_timestamp.map(U256::from);
4040

4141
spawn(self.clone(), {
4242
let mut connector = self.clone();
@@ -158,12 +158,12 @@ where
158158
Some(parent_blockhash) => {
159159
match connector.block_by_hash(parent_blockhash).compat().await {
160160
Ok(Some(block)) => {
161-
if reference_timestamp
161+
let younger_than_reference_timestamp = reference_timestamp
162162
.map(|reference_timestamp| {
163163
reference_timestamp <= block.timestamp
164164
})
165-
.unwrap_or(false)
166-
{
165+
.unwrap_or(false);
166+
if younger_than_reference_timestamp {
167167
join(
168168
block_queue.send(block.clone()),
169169
look_in_the_past_queue.send(block.parent_hash),

0 commit comments

Comments
 (0)