Skip to content

fix(lint): clean clippy for sources without streaming - #983

Merged
LargeModGames merged 5 commits into
mainfrom
fix/qobuz-only-clippy
Nov 5, 2026
Merged

LargeModGames merged 5 commits into
mainfrom
fix/qobuz-only-clippy

Conversation

@LargeModGames

@LargeModGames LargeModGames commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner

Summary

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.

@coderabbitai

coderabbitai Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

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.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Refactor

Merge Risk: Minimal · up to d2b14

No actionable merge-blocking risk remains after normal checks.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed 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 Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed 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.

Share

Recent review info

Run configuration

Commits

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.

@codecov

codecov Bot commented Nov 5, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/core/app/queue_suspend.rs 0.0% 2 Missing ⚠️
src/infra/queue/dispatch.rs 0.0% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@LargeModGames
LargeModGames merged commit b0032ad into main Nov 5, 2026
39 of 41 checks passed
@LargeModGames
LargeModGames deleted the fix/qobuz-only-clippy branch November 5, 2026 20:29
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.

1 participant