You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(lint): clean clippy for sources without streaming - #983
Clippy failed with -D warnings on feature sets that have a source but no streaming, for example telemetry,tui,qobuz. No CI leg builds such a set.
Driver. Only the streaming arm reads source_owns_playback, so each source assignment was unused. A build without streaming now reads the flag one time, in place of an allow on the let that did not cover the later assignments.
Queue.SuspendedContext::Radio now boxes its TrackInfo. Without the Spotify variants, it was 232 bytes against 24 for the next variant (large_enum_variant).
Media metadata. A radio-only build reads no generated title, so source_playback_snapshot reads strings one time when audio-decode-queue is off.
Testing
cargo fmt --all -- --check: exit 0
cargo clippy -- -D warnings: exit 0 for each source alone with telemetry,tui, telemetry,qobuz, telemetry,internet-radio, telemetry,tui,subsonic,internet-radio,youtube, telemetry,tui, telemetry, telemetry,streaming, telemetry,tui,soloist, all-sources and the default build
cargo test --no-default-features --features telemetry,tui: 1907 passed, 0 failed
cargo test: 2416 passed, 0 failed, 8 ignored
Additional notes
No behavior change.
💬 Questions or want to chat with other contributors? Join the spotatui Discord.
Summary by CodeRabbit
Chores
Improved build handling for configurations with streaming or audio decoding disabled.
Updated radio playback suspension and resume handling without changing playback behavior.
Bug Fixes
No user-visible bug fixes or changes to playback selection were reported in this update.
No actionable comments were generated in the recent review.
Walkthrough
The radio suspension context now stores its station in a box, and radio resume dereferences that value before inserting it into the track table. Builds with streaming or the audio decode queue disabled explicitly consume variables that would otherwise be unused.
Changes: Radio suspension
Layer / File(s)
Summary
Boxed radio station suspension and resume src/core/queue.rs, src/core/app/queue_suspend.rs, src/infra/queue/dispatch.rs
SuspendedContext::Radio stores the station in a Box. Both suspension paths box the station, and the resume path dereferences it before track-table insertion.
Disabled-feature bindings
Layer / File(s)
Summary
Consume variables in disabled-feature builds src/core/driver/mod.rs, src/infra/media_metadata.rs
When streaming is disabled, the driver explicitly consumes source_owns_playback. When the audio decode queue is disabled, media metadata explicitly consumes strings. Playback-position selection and queue-enabled title generation remain unchanged.
No actionable merge-blocking risk remains after normal checks.
Pre-merge checks: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title uses the allowed fix: prefix with an optional lint scope. It concisely describes the Clippy fixes for builds without streaming and uses an imperative subject.
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Finishing Touches
Generate docstrings
Commit to this branch
Create a new PR
Generate unit tests (beta)
Commit to this branch
Create a new PR
Simplify code
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Reviewing files that changed from the base of the PR and between 626ec2a and d2b143d.
Files selected for processing: 5
src/core/app/queue_suspend.rs
src/core/driver/mod.rs
src/core/queue.rs
src/infra/media_metadata.rs
src/infra/queue/dispatch.rs
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.
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
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.
Summary
Clippy failed with
-D warningson feature sets that have a source but nostreaming, for exampletelemetry,tui,qobuz. No CI leg builds such a set.streamingarm readssource_owns_playback, so each source assignment was unused. A build withoutstreamingnow reads the flag one time, in place of anallowon theletthat did not cover the later assignments.SuspendedContext::Radionow boxes itsTrackInfo. Without the Spotify variants, it was 232 bytes against 24 for the next variant (large_enum_variant).source_playback_snapshotreadsstringsone time whenaudio-decode-queueis off.Testing
telemetry,tui,telemetry,qobuz,telemetry,internet-radio,telemetry,tui,subsonic,internet-radio,youtube,telemetry,tui,telemetry,telemetry,streaming,telemetry,tui,soloist,all-sourcesand the default buildAdditional notes
No behavior change.
💬 Questions or want to chat with other contributors? Join the spotatui Discord.
Summary by CodeRabbit
Chores
Bug Fixes