From ad530d73ceddf227adf0ed2ccb03f3cb19cca226 Mon Sep 17 00:00:00 2001 From: Tyera Eulberg Date: Wed, 6 Apr 2022 18:45:27 -0400 Subject: [PATCH] Bump lru crate (#24151) --- Cargo.lock | 4 ++-- core/Cargo.toml | 2 +- gossip/Cargo.toml | 2 +- gossip/src/cluster_info_metrics.rs | 9 +-------- ledger/Cargo.toml | 2 +- 5 files changed, 6 insertions(+), 13 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b4c618f8af..6e40aee2c3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2384,9 +2384,9 @@ dependencies = [ [[package]] name = "lru" -version = "0.7.3" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcb87f3080f6d1d69e8c564c0fcfde1d7aa8cc451ce40cae89479111f03bc0eb" +checksum = "32613e41de4c47ab04970c348ca7ae7382cf116625755af070b008a15516a889" dependencies = [ "hashbrown", ] diff --git a/core/Cargo.toml b/core/Cargo.toml index 0a6c2bab8b..088fb9c153 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -26,7 +26,7 @@ fs_extra = "1.2.0" histogram = "0.6.9" itertools = "0.10.3" log = "0.4.14" -lru = "0.7.3" +lru = "0.7.5" rand = "0.7.0" rand_chacha = "0.2.2" rayon = "1.5.1" diff --git a/gossip/Cargo.toml b/gossip/Cargo.toml index 78def61903..86332dcc9e 100644 --- a/gossip/Cargo.toml +++ b/gossip/Cargo.toml @@ -18,7 +18,7 @@ flate2 = "1.0" indexmap = { version = "1.8", features = ["rayon"] } itertools = "0.10.3" log = "0.4.14" -lru = "0.7.3" +lru = "0.7.5" matches = "0.1.9" num-traits = "0.2" rand = "0.7.0" diff --git a/gossip/src/cluster_info_metrics.rs b/gossip/src/cluster_info_metrics.rs index c640ee464f..723bd03c07 100644 --- a/gossip/src/cluster_info_metrics.rs +++ b/gossip/src/cluster_info_metrics.rs @@ -536,14 +536,7 @@ pub(crate) fn submit_gossip_stats( .pull .votes .into_iter() - .map(|(slot, num_votes)| (*slot, *num_votes)) - .chain( - crds_stats - .push - .votes - .into_iter() - .map(|(slot, num_votes)| (*slot, *num_votes)), - ) + .chain(crds_stats.push.votes.into_iter()) .into_grouping_map() .aggregate(|acc, _slot, num_votes| Some(acc.unwrap_or_default() + num_votes)); submit_vote_stats("cluster_info_crds_stats_votes", &votes); diff --git a/ledger/Cargo.toml b/ledger/Cargo.toml index 2ca3c4693a..1fdd364a1e 100644 --- a/ledger/Cargo.toml +++ b/ledger/Cargo.toml @@ -22,7 +22,7 @@ itertools = "0.10.3" lazy_static = "1.4.0" libc = "0.2.120" log = { version = "0.4.14" } -lru = "0.7.3" +lru = "0.7.5" num-derive = "0.3" num-traits = "0.2" num_cpus = "1.13.1"