Commit a3ad3a4
fix(shared-context): edition 2024 for let-chains + Option/Result coercion in registry_guard
The 2026-05-25 migration introduced let-chains syntax into shared-context
(exclusion_registry.rs, registry_guard.rs, storage.rs) but left
shared-context/Cargo.toml at edition = "2021", so local builds of every
fleet bot fail with "let chains are only allowed in Rust 2024 or later".
Additionally, registry_guard.rs:127 was calling
.and_then(|r| r.url().map(|s| s.to_string())) on git2::Remote::url()
which returns Result<&str, Error> (not Option<&str>), producing an
Option/Result type mismatch. The same buggy line was duplicated in
robot-repo-automaton/src/registry_guard.rs:131.
Changes:
- shared-context/Cargo.toml: edition 2021 -> 2024 (rustc 1.85+; CI uses
dtolnay/rust-toolchain@stable which already supports it)
- shared-context/src/registry_guard.rs:126: insert .ok() between
r.url() and the .map(|s| s.to_string()) to coerce Result to Option
- robot-repo-automaton/src/registry_guard.rs:131: same .ok() fix
Verified locally with cargo check on:
shared-context, robot-repo-automaton, dashboard, shared-context/fleet-cli,
bots/{accessibilitybot,cipherbot,echidnabot,finishingbot,glambot,gsbot,
panicbot,rhodibot,seambot,the-hotchocolabot}
Pre-existing unrelated break (out of scope): bots/sustainabot has a
path dependency on bots/panic-attacker/ which does not exist in-tree.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 18f87f3 commit a3ad3a4
3 files changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
| 131 | + | |
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | | - | |
| 126 | + | |
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
| |||
0 commit comments