-
-
Notifications
You must be signed in to change notification settings - Fork 144
Make code rust 1.87.0 compatible #1265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the codebase to be compatible with Rust 1.87.0 by refactoring let-chain syntax patterns that are no longer supported in the newer compiler version. The changes convert chained let-if conditions into nested if-let statements.
- Replaced let-chain patterns with nested if-let statements for Rust 1.87.0 compatibility
- Added clippy allow annotation to suppress warnings about collapsible if statements
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if let Some(entries) = self.data.get(&map_info_type) { | ||
| if entries.is_empty() { | ||
| continue; | ||
| } |
Copilot
AI
Oct 25, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] This nested if structure could be simplified by inverting the condition: if let Some(entries) = self.data.get(&map_info_type) && !entries.is_empty() would be more readable. However, since the PR description indicates this change is for Rust 1.87.0 compatibility, consider adding a comment explaining why the let-chain pattern was replaced, to prevent future refactoring back to the original style.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #1265 +/- ##
==========================================
- Coverage 94.50% 94.47% -0.04%
==========================================
Files 148 148
Lines 5641 5643 +2
Branches 349 349
==========================================
Hits 5331 5331
- Misses 249 251 +2
Partials 61 61 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
CodSpeed Performance ReportMerging #1265 will not alter performanceComparing Summary
|
Needed until HA armv6 is deprecated. See https://github.com/home-assistant/core/actions/runs/18808127691/job/53665385561 as the wheels builder is using alpine 3.22, which is shipped with rust version 1.87.0 but the code required at least 1.88.0