Skip to content

Commit 95f9967

Browse files
YousefSalamafacebook-github-bot
authored andcommitted
use Itertools::chunk_by instead of Itertools::group_by
Summary: They have the same functionality but `group_by` is deprecated. Reviewed By: RajivTS, lmvasquezg Differential Revision: D64534935 fbshipit-source-id: 51567c212dec8f5fee0de7b0f445c129b8550bde
1 parent c749d2f commit 95f9967

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

eden/mononoke/cmds/blobstore_healer/wal_healer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ impl WalHealer {
187187
let healing_futures: Vec<(_, u64)> = queue_entries
188188
.into_iter()
189189
.sorted_by_key(|entry| entry.blobstore_key.clone())
190-
.group_by(|entry| entry.blobstore_key.clone())
190+
.chunk_by(|entry| entry.blobstore_key.clone())
191191
.into_iter()
192192
.map(|(key, entries)| {
193193
let entries: Vec<_> = entries.into_iter().collect();

eden/mononoke/features/history_traversal/src/log.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ async fn process_deletion_nodes(
503503
deleted_to_last_mapping.sort_by_key(|(deleted_linknode, _)| *deleted_linknode);
504504
deleted_to_last_mapping
505505
.into_iter()
506-
.group_by(|(deleted_linknode, _)| **deleted_linknode)
506+
.chunk_by(|(deleted_linknode, _)| **deleted_linknode)
507507
.into_iter()
508508
.for_each(|(deleted_linknode, grouped_last)| {
509509
history_graph.insert(
@@ -789,7 +789,7 @@ async fn augment_history_graph_insertions_with_mutable_ancestry(
789789
graph_insertions.sort_unstable_by_key(|((_, path), _)| path.clone());
790790
let graph_insertions_by_path = graph_insertions
791791
.into_iter()
792-
.group_by(|((_, path), _)| path.clone());
792+
.chunk_by(|((_, path), _)| path.clone());
793793
let graph_insertions_by_path = graph_insertions_by_path
794794
.into_iter()
795795
.map(|(k, v)| (k, v.collect::<Vec<_>>()))

eden/mononoke/newfilenodes/src/reader.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ async fn select_paths<I: Iterator<Item = PathHashBytes>>(
615615
recorder: &PerfCounterRecorder<'_>,
616616
) -> Result<HashMap<PathHashBytes, PathBytes>, ErrorKind> {
617617
let futs = iter
618-
.group_by(|path_hash| connections.shard_id(path_hash))
618+
.chunk_by(|path_hash| connections.shard_id(path_hash))
619619
.into_iter()
620620
.map(|(shard_id, group)| {
621621
let group = group.collect::<Vec<_>>();

eden/mononoke/walker/src/detail/state.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -863,7 +863,7 @@ impl TailingWalkVisitor for WalkState {
863863
.deferred_bcs
864864
.iter()
865865
.flat_map(|e| e.value().clone())
866-
.group_by(|e| e.label)
866+
.chunk_by(|e| e.label)
867867
.into_iter()
868868
.map(|(key, group)| (key, group.count()))
869869
.collect();

eden/mononoke/walker/src/detail/validate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ impl ValidatingVisitor {
218218
),
219219
checks_by_node_type: include_checks
220220
.into_iter()
221-
.group_by(|c| c.node_type())
221+
.chunk_by(|c| c.node_type())
222222
.into_iter()
223223
.map(|(key, group)| (key, HashSet::from_iter(group)))
224224
.collect(),

0 commit comments

Comments
 (0)