Skip to content

Conversation

@edenhaus
Copy link
Member

@edenhaus edenhaus commented Oct 25, 2025

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

Copilot AI review requested due to automatic review settings October 25, 2025 22:00
@edenhaus edenhaus added the pr: bugfix PR, which fixes a bug label Oct 25, 2025
Copy link
Contributor

Copilot AI left a 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.

Comment on lines +92 to +95
if let Some(entries) = self.data.get(&map_info_type) {
if entries.is_empty() {
continue;
}
Copy link

Copilot AI Oct 25, 2025

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.

Copilot uses AI. Check for mistakes.
@codecov
Copy link

codecov bot commented Oct 25, 2025

Codecov Report

❌ Patch coverage is 90.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 94.47%. Comparing base (72d11d7) to head (a66629f).
⚠️ Report is 1 commits behind head on dev.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/map/map_info.rs 90.00% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@codspeed-hq
Copy link

codspeed-hq bot commented Oct 25, 2025

CodSpeed Performance Report

Merging #1265 will not alter performance

Comparing rust-1.87.0-compatibility (a66629f) with dev (72d11d7)

Summary

✅ 9 untouched

@edenhaus edenhaus merged commit 62e6d8c into dev Oct 25, 2025
34 of 36 checks passed
@edenhaus edenhaus deleted the rust-1.87.0-compatibility branch October 25, 2025 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: bugfix PR, which fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants