From 9ccaf11f80b7be7b79f11ac2051d54b744332eff Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 17 Jun 2026 01:58:05 +0000 Subject: [PATCH 1/2] Bump the crates-io group across 2 directories with 1 update Updates the requirements on and [itertools](https://github.com/rust-itertools/itertools) to permit the latest version. Updates `itertools` to 0.15.0 - [Changelog](https://github.com/rust-itertools/itertools/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-itertools/itertools/compare/v0.14.0...v0.15.0) Updates `itertools` to 0.15.0 - [Changelog](https://github.com/rust-itertools/itertools/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-itertools/itertools/compare/v0.14.0...v0.15.0) --- updated-dependencies: - dependency-name: itertools dependency-version: 0.15.0 dependency-type: direct:production dependency-group: crates-io - dependency-name: itertools dependency-version: 0.15.0 dependency-type: direct:production dependency-group: crates-io ... Signed-off-by: dependabot[bot] --- host/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/host/Cargo.toml b/host/Cargo.toml index d75c8624..93e36219 100644 --- a/host/Cargo.toml +++ b/host/Cargo.toml @@ -51,7 +51,7 @@ hashbrown = { version = "0.17", default-features = false, features = ["inline-mo indoc = "2" inline-snap = { path = "inline-snap" } inline-snap-macro = { path = "inline-snap-macro" } -itertools = { version = "0.14", default-features = false } +itertools = { version = "0.15", default-features = false } js-bindgen-cli-lib = { path = "cli-lib" } js-bindgen-ld-shared = { path = "ld-shared" } js-bindgen-shared = { path = "shared" } From de928f2358d6fc858511009db386c9d491adb90d Mon Sep 17 00:00:00 2001 From: Noz Wu Date: Thu, 18 Jun 2026 00:00:56 +0800 Subject: [PATCH 2/2] Fix itertools --- host/cli-lib/src/lib.rs | 6 +++--- host/inline-snap/src/lib.rs | 8 +++----- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/host/cli-lib/src/lib.rs b/host/cli-lib/src/lib.rs index 48e1f2aa..0f6ff164 100644 --- a/host/cli-lib/src/lib.rs +++ b/host/cli-lib/src/lib.rs @@ -6,7 +6,7 @@ use std::ops::Deref; use anyhow::Result; use foldhash::fast::FixedState; use hashbrown::HashMap; -use itertools::{Itertools, Position}; +use itertools::Itertools; use serde::{Deserialize, Serialize}; use wasmparser::MemoryType; @@ -77,7 +77,7 @@ impl + Display + Eq + Hash + Serialize> JsOutput<'_, T> { write!(output, "\t\t\t\t'{name}': ")?; for (position, line) in js.lines().with_position() { - if let Position::Middle | Position::Last = position { + if position.is_middle() || position.is_last() { if line.is_empty() { output.write_all(b"\n")?; } else { @@ -113,7 +113,7 @@ impl + Display + Eq + Hash + Serialize> JsOutput<'_, T> { write!(output, "\t\t\t\t'{name}': ")?; for (position, line) in js.lines().with_position() { - if let Position::Middle | Position::Last = position { + if position.is_middle() || position.is_last() { if line.is_empty() { output.write_all(b"\n")?; } else { diff --git a/host/inline-snap/src/lib.rs b/host/inline-snap/src/lib.rs index f7c1bd3f..7c856bb9 100644 --- a/host/inline-snap/src/lib.rs +++ b/host/inline-snap/src/lib.rs @@ -6,7 +6,7 @@ use std::{fs, mem}; use dtor::dtor; use hashbrown::HashMap; pub use inline_snap_macro::inline_snap; -use itertools::{Itertools, Position}; +use itertools::Itertools; #[doc(hidden)] pub use prettyplease; #[doc(hidden)] @@ -189,13 +189,11 @@ fn normalize_output(r#type: Type, input: &str, level: usize) -> String { } for (position, mut line) in input.split_inclusive('\n').with_position() { - if let Position::Middle | Position::Last = position - && !line.trim_end().is_empty() - { + if (position.is_middle() || position.is_last()) && !line.trim_end().is_empty() { out.push_str(&tabs); } - if let Position::Last = position { + if position.is_last() { line = line.trim_end(); }