fix(ui): suffix slider step literals to satisfy float_literal_f32_fallback#265
Merged
Conversation
…lback New stable rustc (1.97) adds the future-incompatible `float_literal_f32_fallback` lint, which fires on unsuffixed float literals whose type resolves to f32 only via inference fallback. Under CI's `-D warnings` this breaks the Lint job on every PR, including unrelated dependabot ones. Suffix the three affected slider `.step()` literals as `_f32`. No behaviour change - the literals already resolved to f32.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes CI lint failures introduced by Rust toolchain drift (stable → 1.97), where -D float-literal-f32-fallback turns unsuffixed float literals in slider .step() calls into hard errors. It resolves the issue by explicitly suffixing the affected .step() literals with _f32, matching rustc’s suggestion and preserving behavior.
Changes:
- Add
_f32suffix to the HP cutoff slider step literal inSharedApp::view_io_tab. - Add
_f32suffix to the LP cutoff slider step literal inSharedApp::view_io_tab. - Add
_f32suffix to the IR gain slider step literal inIrCabinetControl.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| rustortion-ui/src/app.rs | Suffixes the HP/LP cutoff slider .step() literals with _f32 to satisfy the new lint on Rust 1.97. |
| rustortion-ui/src/components/ir_cabinet_control.rs | Suffixes the IR gain slider .step() literal with _f32 to satisfy the new lint on Rust 1.97. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
OpenSauce
enabled auto-merge (squash)
July 14, 2026 08:02
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
CI's Lint job is failing on
mainand on every open PR (e.g. #264, a dependabot bump that has nothing to do with these files):This is toolchain drift, not a code regression. CI uses
dtolnay/rust-toolchain@stable, which now resolves to 1.97.0. That release adds the future-incompatible lintfloat_literal_f32_fallback, which fires on unsuffixed float literals whose type is only settled by inference fallback. Our-D warningsturns it into a hard error.Fix
Suffix the three affected slider
.step()literals as_f32— exactly what rustc suggests.rustortion-ui/src/app.rs— HP and LP cutoff slidersrustortion-ui/src/components/ir_cabinet_control.rs— IR gain sliderNo behaviour change. These literals already resolved to
f32; the suffix just states it explicitly instead of leaning on fallback.Verification
The lint doesn't exist on older toolchains, so a local
make linton 1.95 passes even without this fix — it can't prove anything. Verified against 1.97 specifically, matching CI:Note on #264
#264 needs this on
mainand then a rebase — its own diff is unrelated. Once this lands, dependabot will rebase and its Lint job should go green.