From 2910fd467f7358b5bae6b00606a15d78c1a3a8f6 Mon Sep 17 00:00:00 2001 From: Ryo Onodera Date: Tue, 11 Aug 2020 22:53:55 +0900 Subject: [PATCH] Fix rust fmt (#11537) --- core/src/crds_gossip_pull.rs | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/core/src/crds_gossip_pull.rs b/core/src/crds_gossip_pull.rs index e3fc75f6e1..f5168c27f1 100644 --- a/core/src/crds_gossip_pull.rs +++ b/core/src/crds_gossip_pull.rs @@ -394,21 +394,17 @@ impl CrdsGossipPull { } let mut total_skipped = 0; for v in crds.table.values() { - recent - .iter() - .enumerate() - .for_each(|(i, (caller, filter))| { - //skip values that are too new - if v.value.wallclock() - > caller.wallclock().checked_add(jitter).unwrap_or_else(|| 0) - { - total_skipped += 1; - return; - } - if !filter.contains(&v.value_hash) { - ret[i].push(v.value.clone()); - } - }); + recent.iter().enumerate().for_each(|(i, (caller, filter))| { + //skip values that are too new + if v.value.wallclock() > caller.wallclock().checked_add(jitter).unwrap_or_else(|| 0) + { + total_skipped += 1; + return; + } + if !filter.contains(&v.value_hash) { + ret[i].push(v.value.clone()); + } + }); } inc_new_counter_info!("gossip_filter_crds_values-dropped_values", total_skipped); ret