Skip to content

Commit e8a3406

Browse files
arihant2mathyouknowone
authored andcommitted
itertools upgrade
1 parent fde87a3 commit e8a3406

4 files changed

Lines changed: 12 additions & 12 deletions

File tree

‎Cargo.lock‎

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Cargo.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ glob = "0.3"
151151
hex = "0.4.3"
152152
indexmap = { version = "2.2.6", features = ["std"] }
153153
insta = "1.38.0"
154-
itertools = "0.12.1"
154+
itertools = "0.14.0"
155155
is-macro = "0.3.7"
156156
junction = "1.2.0"
157157
libc = "0.2.169"

‎compiler/codegen/src/compile.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2723,7 +2723,7 @@ impl Compiler {
27232723

27242724
fn compile_keywords(&mut self, keywords: &[located_ast::Keyword]) -> CompileResult<()> {
27252725
let mut size = 0;
2726-
let groupby = keywords.iter().group_by(|e| e.arg.is_none());
2726+
let groupby = keywords.iter().chunk_by(|e| e.arg.is_none());
27272727
for (is_unpacking, sub_keywords) in &groupby {
27282728
if is_unpacking {
27292729
for keyword in sub_keywords {
@@ -2886,7 +2886,7 @@ impl Compiler {
28862886
(false, element)
28872887
}
28882888
})
2889-
.group_by(|(starred, _)| *starred);
2889+
.chunk_by(|(starred, _)| *starred);
28902890

28912891
for (starred, run) in &groups {
28922892
let mut run_size = 0;

‎stdlib/src/math.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ mod math {
356356
.map(|x| (x / scale).powi(2))
357357
.chain(std::iter::once(-norm * norm))
358358
// Pairwise summation of floats gives less rounding error than a naive sum.
359-
.tree_fold1(std::ops::Add::add)
359+
.tree_reduce(std::ops::Add::add)
360360
.expect("expected at least 1 element");
361361
norm = norm + correction / (2.0 * norm);
362362
}

0 commit comments

Comments
 (0)