Fix rust fmt (#11537)

This commit is contained in:
Ryo Onodera 2020-08-11 22:53:55 +09:00 committed by GitHub
parent 713851b68d
commit 2910fd467f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 15 deletions

View File

@ -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