From e16a9b623fca3e47c37ca0df27c77071eeff8eab Mon Sep 17 00:00:00 2001 From: Alden Hu Date: Tue, 23 Jul 2024 15:42:43 -0700 Subject: [PATCH] upgrade itertools dependency (#14083) --- Cargo.lock | 101 ++++++++++-------- Cargo.toml | 2 +- .../aptos-debugger/src/aptos_debugger.rs | 4 +- .../framework/src/application/interface.rs | 2 +- 4 files changed, 59 insertions(+), 50 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c7b8d070f23f7..85768d9848c77 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -312,7 +312,7 @@ dependencies = [ "dirs", "futures", "hex", - "itertools 0.12.1", + "itertools 0.13.0", "jemallocator", "maplit", "move-binary-format", @@ -442,7 +442,7 @@ dependencies = [ "fail", "futures", "hex", - "itertools 0.12.1", + "itertools 0.13.0", "mime", "mini-moka", "move-core-types", @@ -581,7 +581,7 @@ dependencies = [ "clap 4.4.14", "csv", "futures", - "itertools 0.12.1", + "itertools 0.13.0", "move-binary-format", "move-bytecode-verifier", "num_cpus", @@ -670,7 +670,7 @@ dependencies = [ "dashmap", "derivative", "fail", - "itertools 0.12.1", + "itertools 0.13.0", "move-binary-format", "move-core-types", "move-vm-types", @@ -697,7 +697,7 @@ dependencies = [ "clap 4.4.14", "criterion", "dashmap", - "itertools 0.12.1", + "itertools 0.13.0", "jemallocator", "move-core-types", "once_cell", @@ -793,7 +793,7 @@ dependencies = [ "bcs 0.1.4", "clap 4.4.14", "futures", - "itertools 0.12.1", + "itertools 0.13.0", "move-compiler", "move-core-types", "move-model", @@ -907,7 +907,7 @@ dependencies = [ "futures", "futures-channel", "hex", - "itertools 0.12.1", + "itertools 0.13.0", "lru 0.7.8", "maplit", "mini-moka", @@ -968,7 +968,7 @@ dependencies = [ "bcs 0.1.4", "fail", "futures", - "itertools 0.12.1", + "itertools 0.13.0", "mini-moka", "mirai-annotations", "once_cell", @@ -1089,7 +1089,7 @@ dependencies = [ "claims", "dashmap", "futures", - "itertools 0.12.1", + "itertools 0.13.0", "maplit", "mockall", "ordered-float 3.9.2", @@ -1163,7 +1163,7 @@ dependencies = [ "either", "hex", "indicatif 0.15.0", - "itertools 0.12.1", + "itertools 0.13.0", "lru 0.7.8", "move-core-types", "num-derive", @@ -1235,7 +1235,7 @@ dependencies = [ "aptos-vm", "bcs 0.1.4", "clap 4.4.14", - "itertools 0.12.1", + "itertools 0.13.0", "tokio", ] @@ -1416,7 +1416,7 @@ dependencies = [ "bytes", "dashmap", "fail", - "itertools 0.12.1", + "itertools 0.13.0", "move-core-types", "once_cell", "proptest", @@ -1459,7 +1459,7 @@ dependencies = [ "clap 4.4.14", "derivative", "indicatif 0.15.0", - "itertools 0.12.1", + "itertools 0.13.0", "jemallocator", "move-core-types", "num_cpus", @@ -1493,7 +1493,7 @@ dependencies = [ "crossbeam-channel", "ctrlc", "dashmap", - "itertools 0.12.1", + "itertools 0.13.0", "num_cpus", "once_cell", "rayon", @@ -1535,7 +1535,7 @@ dependencies = [ "aptos-types", "bcs 0.1.4", "criterion", - "itertools 0.12.1", + "itertools 0.13.0", "once_cell", "serde", "thiserror", @@ -1552,7 +1552,7 @@ dependencies = [ "aptos-metrics-core", "bitvec 1.0.1", "criterion", - "itertools 0.12.1", + "itertools 0.13.0", "jemallocator", "once_cell", "proptest", @@ -1718,7 +1718,7 @@ dependencies = [ "futures", "hex", "hyper 0.14.28", - "itertools 0.12.1", + "itertools 0.13.0", "json-patch", "k8s-openapi", "kube", @@ -1799,7 +1799,7 @@ dependencies = [ "either", "flate2", "hex", - "itertools 0.12.1", + "itertools 0.13.0", "libsecp256k1", "log", "lru 0.7.8", @@ -2119,7 +2119,7 @@ dependencies = [ "goldenfile", "hex", "hyper 0.14.28", - "itertools 0.12.1", + "itertools 0.13.0", "move-binary-format", "move-core-types", "move-package", @@ -2240,7 +2240,7 @@ dependencies = [ "cloud-storage", "dashmap", "futures", - "itertools 0.12.1", + "itertools 0.13.0", "lz4", "once_cell", "prometheus", @@ -2305,7 +2305,7 @@ dependencies = [ "arr_macro", "bcs 0.1.4", "byteorder", - "itertools 0.12.1", + "itertools 0.13.0", "num-derive", "num-traits", "once_cell", @@ -2387,7 +2387,7 @@ dependencies = [ "ark-ff", "base64 0.13.1", "hex", - "itertools 0.12.1", + "itertools 0.13.0", "num-bigint 0.3.3", "num-modular", "num-traits", @@ -2627,7 +2627,7 @@ dependencies = [ "enum_dispatch", "fail", "futures", - "itertools 0.12.1", + "itertools 0.13.0", "maplit", "num_cpus", "once_cell", @@ -2691,7 +2691,7 @@ dependencies = [ "aptos-vm-types", "bcs 0.1.4", "clap 4.4.14", - "itertools 0.12.1", + "itertools 0.13.0", "regex", "reqwest", "tokio", @@ -2848,7 +2848,7 @@ dependencies = [ "futures", "futures-util", "hex", - "itertools 0.12.1", + "itertools 0.13.0", "maplit", "once_cell", "ordered-float 3.9.2", @@ -3149,7 +3149,7 @@ version = "0.1.0" dependencies = [ "anyhow", "aptos-framework", - "itertools 0.12.1", + "itertools 0.13.0", "move-command-line-common", "move-package", "tempfile", @@ -3454,7 +3454,7 @@ dependencies = [ "clap 4.4.14", "futures", "hex", - "itertools 0.12.1", + "itertools 0.13.0", "move-core-types", "once_cell", "reqwest", @@ -3549,7 +3549,7 @@ dependencies = [ "aptos-types", "bitvec 1.0.1", "criterion", - "itertools 0.12.1", + "itertools 0.13.0", "jemallocator", "once_cell", "proptest", @@ -3989,7 +3989,7 @@ dependencies = [ "csv", "futures", "hex", - "itertools 0.12.1", + "itertools 0.13.0", "rand 0.7.3", "reqwest", "tokio", @@ -4065,7 +4065,7 @@ dependencies = [ "async-trait", "clap 4.4.14", "futures", - "itertools 0.12.1", + "itertools 0.13.0", "once_cell", "rand 0.7.3", "rand_core 0.5.1", @@ -4175,7 +4175,7 @@ dependencies = [ "fxhash", "hashbrown 0.14.3", "hex", - "itertools 0.12.1", + "itertools 0.13.0", "jsonwebtoken 8.3.0", "move-binary-format", "move-bytecode-verifier", @@ -9581,6 +9581,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.10" @@ -10470,7 +10479,7 @@ dependencies = [ "better_any", "bytes", "datatest-stable", - "itertools 0.12.1", + "itertools 0.13.0", "move-binary-format", "move-command-line-common", "move-compiler", @@ -10664,7 +10673,7 @@ dependencies = [ "ethnum", "flexi_logger", "im", - "itertools 0.12.1", + "itertools 0.13.0", "log", "move-binary-format", "move-bytecode-source-map", @@ -10690,7 +10699,7 @@ name = "move-compiler-v2-transactional-tests" version = "0.1.0" dependencies = [ "datatest-stable", - "itertools 0.12.1", + "itertools 0.13.0", "move-command-line-common", "move-compiler-v2", "move-model", @@ -10768,7 +10777,7 @@ dependencies = [ "codespan", "codespan-reporting", "datatest-stable", - "itertools 0.12.1", + "itertools 0.13.0", "log", "move-compiler", "move-core-types", @@ -10895,7 +10904,7 @@ dependencies = [ "codespan-reporting", "datatest-stable", "internment", - "itertools 0.12.1", + "itertools 0.13.0", "log", "move-binary-format", "move-bytecode-source-map", @@ -10923,7 +10932,7 @@ dependencies = [ "datatest-stable", "evm-exec-utils", "hex", - "itertools 0.12.1", + "itertools 0.13.0", "move-abigen", "move-binary-format", "move-bytecode-source-map", @@ -10960,7 +10969,7 @@ dependencies = [ "clap 4.4.14", "codespan-reporting", "datatest-stable", - "itertools 0.12.1", + "itertools 0.13.0", "log", "move-abigen", "move-command-line-common", @@ -10991,7 +11000,7 @@ dependencies = [ "codespan", "codespan-reporting", "futures", - "itertools 0.12.1", + "itertools 0.13.0", "log", "move-binary-format", "move-command-line-common", @@ -11018,7 +11027,7 @@ dependencies = [ "anyhow", "codespan-reporting", "datatest-stable", - "itertools 0.12.1", + "itertools 0.13.0", "log", "move-binary-format", "move-core-types", @@ -11063,7 +11072,7 @@ dependencies = [ "datatest-stable", "ethnum", "im", - "itertools 0.12.1", + "itertools 0.13.0", "log", "move-binary-format", "move-core-types", @@ -11158,7 +11167,7 @@ dependencies = [ "ethnum", "evm", "evm-exec-utils", - "itertools 0.12.1", + "itertools 0.13.0", "maplit", "move-command-line-common", "move-compiler", @@ -11221,7 +11230,7 @@ dependencies = [ "difference", "evm", "evm-exec-utils", - "itertools 0.12.1", + "itertools 0.13.0", "move-binary-format", "move-bytecode-utils", "move-command-line-common", @@ -11328,7 +11337,7 @@ dependencies = [ "bytes", "claims", "derivative", - "itertools 0.12.1", + "itertools 0.13.0", "move-binary-format", "move-core-types", "proptest", @@ -13230,7 +13239,7 @@ dependencies = [ "chrono", "clap 4.4.14", "codespan-reporting", - "itertools 0.12.1", + "itertools 0.13.0", "log", "move-compiler", "move-model", @@ -15500,7 +15509,7 @@ dependencies = [ "crossbeam-channel", "getrandom 0.2.11", "hex", - "itertools 0.12.1", + "itertools 0.13.0", "module-generation", "move-binary-format", "move-bytecode-verifier", diff --git a/Cargo.toml b/Cargo.toml index b13fbc7182f16..010b7324049a3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -606,7 +606,7 @@ indoc = "1.0.6" inferno = "0.11.14" internment = { version = "0.5.0", features = ["arc"] } ipnet = "2.5.0" -itertools = "0.12" +itertools = "0.13" jemallocator = { version = "0.5.0", features = [ "profiling", "unprefixed_malloc_on_supported_platforms", diff --git a/aptos-move/aptos-debugger/src/aptos_debugger.rs b/aptos-move/aptos-debugger/src/aptos_debugger.rs index a587ba83479ce..8a8c1409dec54 100644 --- a/aptos-move/aptos-debugger/src/aptos_debugger.rs +++ b/aptos-move/aptos-debugger/src/aptos_debugger.rs @@ -355,7 +355,7 @@ fn print_transaction_stats(sig_verified_txns: &[SignatureVerifiedTransaction], v .iter() .map(|txn| txn.expect_valid().type_name().to_string()) // conflate same consecutive elements into one with count - .group_by(|k| k.clone()) + .chunk_by(|k| k.clone()) .into_iter() .map(|(k, r)| { let num = r.count(); @@ -384,7 +384,7 @@ fn print_transaction_stats(sig_verified_txns: &[SignatureVerifiedTransaction], v }) // Count number of instances for each (irrsepsecitve of order) .sorted() - .group_by(|k| k.clone()) + .chunk_by(|k| k.clone()) .into_iter() .map(|(k, r)| (r.count(), k)) .sorted_by_key(|(num, _k)| *num) diff --git a/network/framework/src/application/interface.rs b/network/framework/src/application/interface.rs index 35929c4c1d7f7..6ccb2cf36354e 100644 --- a/network/framework/src/application/interface.rs +++ b/network/framework/src/application/interface.rs @@ -237,7 +237,7 @@ impl NetworkClientInterface for NetworkCl for (protocol_id, peers) in peers_per_protocol { for (network_id, peers) in &peers .iter() - .group_by(|peer_network_id| peer_network_id.network_id()) + .chunk_by(|peer_network_id| peer_network_id.network_id()) { let network_sender = self.get_sender_for_network_id(&network_id)?; let peer_ids = peers.map(|peer_network_id| peer_network_id.peer_id());