Skip to content

Fix if-let-guard compile error on stable Rust - #1

Merged
imattau merged 1 commit into
mainfrom
fix/if-let-guard-compile-error
Sep 27, 2026
Merged

imattau merged 1 commit into
mainfrom
fix/if-let-guard-compile-error

Conversation

@imattau

@imattau imattau commented Sep 27, 2026

Copy link
Copy Markdown
Owner

Summary

  • CalendarEvent and RelayStatus construction in crates/nscript-runtime/src/lib.rs used if let guards inside match arms, an unstable Rust feature not available on stable rustc. This kept the workspace from compiling at all on stable toolchains.
  • Rewrote both as a nested match on the fallible u64/u8 conversions instead, with identical accept/reject behaviour (falls back to value.clone() on overflow, exactly as before).

Test plan

  • cargo build --workspace succeeds on stable rustc 1.94.1
  • cargo test --workspace — all tests pass (248 passed, 1 ignored, across all crates)

🤖 Generated with Claude Code

https://claude.ai/code/session_01D95PWA2fdNfg7nUvUHBeMi


Generated by Claude Code

CalendarEvent and RelayStatus construction used if-let guards inside
match arms, an unstable feature not available on stable rustc. Rewrite
both as a nested match on the fallible conversions instead, with
identical accept/reject behaviour.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D95PWA2fdNfg7nUvUHBeMi
@imattau
imattau merged commit eb09d72 into main Sep 27, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants