Skip to content

Commit

Permalink
[deps] bump itertools version (#19307)
Browse files Browse the repository at this point in the history
## Description 

Introduces some [breaking
changes](https://github.com/rust-itertools/itertools/blob/master/CHANGELOG.md),
trying to see if anything yells.

## Test plan 

Counting on signals for this one. None of the breaking changes listed in
the itertools changelog appear anywhere in our codebase based on
grepping for them.

---

## Release notes

Check each box that your changes affect. If none of the boxes relate to
your changes, release notes aren't required.

For each box you select, include information after the relevant heading
that describes the impact of your changes that a user might notice and
any actions they must take to implement updates.

- [ ] Protocol: 
- [ ] Nodes (Validators and Full nodes): 
- [ ] Indexer: 
- [ ] JSON-RPC: 
- [ ] GraphQL: 
- [ ] CLI: 
- [ ] Rust SDK:
- [ ] REST API:
  • Loading branch information
after-ephemera authored and suiwombat committed Sep 16, 2024
1 parent 246c061 commit 00ddb91
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 26 deletions.
38 changes: 19 additions & 19 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ inquire = "0.6.0"
insta = { version = "1.21.1", features = ["redactions", "yaml", "json"] }
integer-encoding = "3.0.1"
ipnetwork = "0.20.0"
itertools = "0.10.5"
itertools = "0.13.0"
jemalloc-ctl = "^0.5"
jsonrpsee = { git = "https://github.com/wlmyng/jsonrpsee.git", rev = "b1b300784795f6a64d0fcdf8f03081a9bc38bde8", features = [
"server",
Expand Down
3 changes: 1 addition & 2 deletions crates/sui-benchmark/src/workloads/adversarial.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ use crate::ProgrammableTransactionBuilder;
use crate::{convert_move_call_args, BenchMoveCallArg, ExecutionEffects, ValidatorProxy};
use anyhow::anyhow;
use async_trait::async_trait;
use itertools::Itertools;
use move_core_types::identifier::Identifier;
use rand::distributions::{Distribution, Standard};
use rand::Rng;
Expand Down Expand Up @@ -144,7 +143,7 @@ impl FromStr for AdversarialPayloadCfg {
if !re.is_match(s) {
return Err(anyhow!("invalid load config"));
};
let toks = s.split('-').collect_vec();
let toks = s.split('-').collect::<Vec<_>>();
let payload_type = AdversarialPayloadType::from_str(toks[0])?;
let load_factor = toks[1].parse::<f32>().unwrap();

Expand Down
4 changes: 2 additions & 2 deletions crates/sui-core/src/authority.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4381,7 +4381,7 @@ impl AuthorityState {
desired_upgrades.sort();
desired_upgrades
.into_iter()
.group_by(|(packages, _authority)| packages.clone())
.chunk_by(|(packages, _authority)| packages.clone())
.into_iter()
.find_map(|(packages, group)| {
// should have been filtered out earlier.
Expand Down Expand Up @@ -4468,7 +4468,7 @@ impl AuthorityState {
desired_upgrades.sort();
desired_upgrades
.into_iter()
.group_by(|(digest, packages, _authority)| (*digest, packages.clone()))
.chunk_by(|(digest, packages, _authority)| (*digest, packages.clone()))
.into_iter()
.find_map(|((digest, packages), group)| {
// should have been filtered out earlier.
Expand Down
2 changes: 1 addition & 1 deletion crates/sui-storage/src/indexes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1461,7 +1461,7 @@ impl IndexStore {
metrics.all_balance_lookup_from_db.inc();
let mut balances: HashMap<TypeTag, TotalBalance> = HashMap::new();
let coins = Self::get_owned_coins_iterator(&coin_index, owner, None)?
.group_by(|(coin_type, _obj_id, _coin)| coin_type.clone());
.chunk_by(|(coin_type, _obj_id, _coin)| coin_type.clone());
for (coin_type, coins) in &coins {
let mut total_balance = 0i128;
let mut coin_object_count = 0;
Expand Down
2 changes: 1 addition & 1 deletion crates/sui-tool/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ pub async fn get_transaction_block(
.sorted_by(|(k1, err1, _), (k2, err2, _)| {
Ord::cmp(k1, k2).then_with(|| Ord::cmp(err1, err2))
})
.group_by(|(_, _err, r)| {
.chunk_by(|(_, _err, r)| {
r.2.as_ref().map(|ok_result| match &ok_result.status {
TransactionStatus::Signed(_) => None,
TransactionStatus::Executed(_, effects, _) => Some((
Expand Down

0 comments on commit 00ddb91

Please sign in to comment.