From bf72996de000f92e4e28b06977c679321b8b1085 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 26 Aug 2024 12:30:24 +0200 Subject: [PATCH] chore(deps): update rust crate itertools to 0.13.0 (#469) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [itertools](https://togithub.com/rust-itertools/itertools) | workspace.dependencies | minor | `0.12.1` -> `0.13.0` | --- ### Release Notes
rust-itertools/itertools (itertools) ### [`v0.13.0`](https://togithub.com/rust-itertools/itertools/blob/HEAD/CHANGELOG.md#0130) [Compare Source](https://togithub.com/rust-itertools/itertools/compare/v0.12.1...v0.13.0) ##### Breaking - Removed implementation of `DoubleEndedIterator` for `ConsTuples` ([#​853](https://togithub.com/rust-itertools/itertools/issues/853)) - Made `MultiProduct` fused and fixed on an empty iterator ([#​835](https://togithub.com/rust-itertools/itertools/issues/835), [#​834](https://togithub.com/rust-itertools/itertools/issues/834)) - Changed `iproduct!` to return tuples for maxi one iterator too ([#​870](https://togithub.com/rust-itertools/itertools/issues/870)) - Changed `PutBack::put_back` to return the old value ([#​880](https://togithub.com/rust-itertools/itertools/issues/880)) - Removed deprecated `repeat_call, Itertools::{foreach, step, map_results, fold_results}` ([#​878](https://togithub.com/rust-itertools/itertools/issues/878)) - Removed `TakeWhileInclusive::new` ([#​912](https://togithub.com/rust-itertools/itertools/issues/912)) ##### Added - Added `Itertools::{smallest_by, smallest_by_key, largest, largest_by, largest_by_key}` ([#​654](https://togithub.com/rust-itertools/itertools/issues/654), [#​885](https://togithub.com/rust-itertools/itertools/issues/885)) - Added `Itertools::tail` ([#​899](https://togithub.com/rust-itertools/itertools/issues/899)) - Implemented `DoubleEndedIterator` for `ProcessResults` ([#​910](https://togithub.com/rust-itertools/itertools/issues/910)) - Implemented `Debug` for `FormatWith` ([#​931](https://togithub.com/rust-itertools/itertools/issues/931)) - Added `Itertools::get` ([#​891](https://togithub.com/rust-itertools/itertools/issues/891)) ##### Changed - Deprecated `Itertools::group_by` (renamed `chunk_by`) ([#​866](https://togithub.com/rust-itertools/itertools/issues/866), [#​879](https://togithub.com/rust-itertools/itertools/issues/879)) - Deprecated `unfold` (use `std::iter::from_fn` instead) ([#​871](https://togithub.com/rust-itertools/itertools/issues/871)) - Optimized `GroupingMapBy` ([#​873](https://togithub.com/rust-itertools/itertools/issues/873), [#​876](https://togithub.com/rust-itertools/itertools/issues/876)) - Relaxed `Fn` bounds to `FnMut` in `diff_with, Itertools::into_group_map_by` ([#​886](https://togithub.com/rust-itertools/itertools/issues/886)) - Relaxed `Debug/Clone` bounds for `MapInto` ([#​889](https://togithub.com/rust-itertools/itertools/issues/889)) - Documented the `use_alloc` feature ([#​887](https://togithub.com/rust-itertools/itertools/issues/887)) - Optimized `Itertools::set_from` ([#​888](https://togithub.com/rust-itertools/itertools/issues/888)) - Removed badges in `README.md` ([#​890](https://togithub.com/rust-itertools/itertools/issues/890)) - Added "no-std" categories in `Cargo.toml` ([#​894](https://togithub.com/rust-itertools/itertools/issues/894)) - Fixed `Itertools::k_smallest` on short unfused iterators ([#​900](https://togithub.com/rust-itertools/itertools/issues/900)) - Deprecated `Itertools::tree_fold1` (renamed `tree_reduce`) ([#​895](https://togithub.com/rust-itertools/itertools/issues/895)) - Deprecated `GroupingMap::fold_first` (renamed `reduce`) ([#​902](https://togithub.com/rust-itertools/itertools/issues/902)) - Fixed `Itertools::k_smallest(0)` to consume the iterator, optimized `Itertools::k_smallest(1)` ([#​909](https://togithub.com/rust-itertools/itertools/issues/909)) - Specialized `Combinations::nth` ([#​914](https://togithub.com/rust-itertools/itertools/issues/914)) - Specialized `MergeBy::fold` ([#​920](https://togithub.com/rust-itertools/itertools/issues/920)) - Specialized `CombinationsWithReplacement::nth` ([#​923](https://togithub.com/rust-itertools/itertools/issues/923)) - Specialized `FlattenOk::{fold, rfold}` ([#​927](https://togithub.com/rust-itertools/itertools/issues/927)) - Specialized `Powerset::nth` ([#​924](https://togithub.com/rust-itertools/itertools/issues/924)) - Documentation fixes ([#​882](https://togithub.com/rust-itertools/itertools/issues/882), [#​936](https://togithub.com/rust-itertools/itertools/issues/936)) - Fixed `assert_equal` for iterators longer than `i32::MAX` ([#​932](https://togithub.com/rust-itertools/itertools/issues/932)) - Updated the `must_use` message of non-lazy `KMergeBy` and `TupleCombinations` ([#​939](https://togithub.com/rust-itertools/itertools/issues/939)) ##### Notable Internal Changes - Tested iterator laziness ([#​792](https://togithub.com/rust-itertools/itertools/issues/792)) - Created `CONTRIBUTING.md` ([#​767](https://togithub.com/rust-itertools/itertools/issues/767))
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View the [repository job log](https://developer.mend.io/github/matter-labs/zksync-withdrawal-finalizer). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Fedor Sakharov --- Cargo.lock | 6 +++--- Cargo.toml | 2 +- watcher/src/lib.rs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 19ebf184..ea25f6d1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2104,9 +2104,9 @@ dependencies = [ [[package]] name = "itertools" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" dependencies = [ "either", ] @@ -4957,7 +4957,7 @@ dependencies = [ "client", "ethers", "futures", - "itertools 0.12.1", + "itertools 0.13.0", "sqlx", "storage", "thiserror", diff --git a/Cargo.toml b/Cargo.toml index b35906a3..89eebe93 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,7 +35,7 @@ tracing = "0.1.40" tracing-subscriber = "0.3.18" sentry = { version = "0.34.0", default-features = false } lazy_static = "1.4.0" -itertools = "0.12.1" +itertools = "0.13.0" serde = "1.0.200" thiserror = "1.0.59" serde_json = "1.0.116" diff --git a/watcher/src/lib.rs b/watcher/src/lib.rs index e0453b74..c405d5ac 100644 --- a/watcher/src/lib.rs +++ b/watcher/src/lib.rs @@ -306,7 +306,7 @@ async fn process_withdrawals_in_block( withdrawals_meterer: &mut Option, ) -> Result<()> { use itertools::Itertools; - let group_by = events.into_iter().group_by(|event| event.tx_hash); + let group_by = events.into_iter().chunk_by(|event| event.tx_hash); let mut withdrawals_vec = vec![]; for (_tx_hash, group) in group_by.into_iter() {