From e62402da371878cf7e81f804661fb8f7ca008016 Mon Sep 17 00:00:00 2001 From: Yuanhao Li Date: Sat, 11 Jul 2026 05:54:30 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20make=20the=20declared=201.85=20MSRV=20tr?= =?UTF-8?q?ue=20=E2=80=94=20remove=20the=20one=20let-chain?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit query.rs used a let-chain (`if x && let Some(..) = ..`), stable only since Rust 1.88 — so builds on the declared rust-version = "1.85" failed with E0658 ("`let` expressions in this position are unstable"). This was caught downstream: yoagent's 1.86 MSRV CI job broke the moment it added yoagent-state as a dependency and had to exclude the feature. Rewritten as a plain nested if-let (identical semantics); a comment marks why, so it isn't "simplified" back into a let-chain. No behavior change; all 15 tests pass; clippy is unchanged (no collapsible_if fired). With this released, downstream crates with MSRVs in the 1.85-1.87 range can depend on yoagent-state again without carve-outs. Co-Authored-By: Claude Fable 5 --- src/query.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/query.rs b/src/query.rs index 93a07e9..4b8600a 100644 --- a/src/query.rs +++ b/src/query.rs @@ -18,10 +18,12 @@ impl Lineage { for rel in incoming.iter().chain(outgoing.iter()) { for node_id in [&rel.from, &rel.to] { - if node_id != id - && let Some(node) = graph.nodes.get(node_id) - { - related.insert(node_id.clone(), node.clone()); + // Plain nested if (not a let-chain): let-chains stabilized in + // Rust 1.88, above this crate's declared 1.85 MSRV. + if node_id != id { + if let Some(node) = graph.nodes.get(node_id) { + related.insert(node_id.clone(), node.clone()); + } } } }