[GH-ISSUE #568] Error on cargo install #1264

Closed
opened 2026-03-14 14:10:23 +03:00 by kerem · 1 comment
Owner

Originally created by @armanhi on GitHub (Oct 1, 2024).
Original GitHub issue: https://github.com/aome510/spotify-player/issues/568

Describe the bug
I'm getting an error when trying to install the application using "cargo install spotify_player --no-default-features --features pulseaudio-backend":

error[E0308]: match arms have incompatible types
--> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/spotify_player-0.19.1/src/state/model.rs:259:25
|
257 | let id = match track.linked_from {
| _________-
258 | | Some(d) => d.id,
| | ---- this is found to be of type std::option::Option<rspotify::rspotify_model::TrackId<'_>>
259 | | None => track.id?,
| | ^^^^^^^^^ expected Option<TrackId<'_>>, found TrackId<'_>
260 | | };
| |
- match arms have incompatible types
|
= note: expected enum std::option::Option<rspotify::rspotify_model::TrackId<'_>>
found struct rspotify::rspotify_model::TrackId<'_>
help: try wrapping the expression in Some
|
259 | None => Some(track.id?),
| +++++ +

error[E0308]: match arms have incompatible types
--> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/spotify_player-0.19.1/src/state/model.rs:280:25
|
278 | let id = match track.linked_from {
| _________-
279 | | Some(d) => d.id,
| | ---- this is found to be of type std::option::Option<rspotify::rspotify_model::TrackId<'_>>
280 | | None => track.id?,
| | ^^^^^^^^^ expected Option<TrackId<'_>>, found TrackId<'_>
281 | | };
| |
- match arms have incompatible types
|
= note: expected enum std::option::Option<rspotify::rspotify_model::TrackId<'_>>
found struct rspotify::rspotify_model::TrackId<'_>
help: try wrapping the expression in Some
|
280 | None => Some(track.id?),
| +++++ +

To Reproduce
Not sure what to add here. I've done a clean rust install and tried to cargo spotify-player.

Expected behaviour
I'd expect a success when installing the application.

Log and backtrace
Please let me know where I could find it.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment

  • OS: Ubuntu server 24.04 LTS
  • Application version: 0.19.1
  • Application features:
    -- cargo install spotify_player --no-default-features --features pulseaudio-backend
    -- cargo install spotify_player

Additional context
If I download the pre-compiled version, it runs successfully, although it shows "No Playback" option.

Originally created by @armanhi on GitHub (Oct 1, 2024). Original GitHub issue: https://github.com/aome510/spotify-player/issues/568 **Describe the bug** I'm getting an error when trying to install the application using "cargo install spotify_player --no-default-features --features pulseaudio-backend": error[E0308]: `match` arms have incompatible types --> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/spotify_player-0.19.1/src/state/model.rs:259:25 | 257 | let id = match track.linked_from { | ______________________- 258 | | Some(d) => d.id, | | ---- this is found to be of type `std::option::Option<rspotify::rspotify_model::TrackId<'_>>` 259 | | None => track.id?, | | ^^^^^^^^^ expected `Option<TrackId<'_>>`, found `TrackId<'_>` 260 | | }; | |_____________- `match` arms have incompatible types | = note: expected enum `std::option::Option<rspotify::rspotify_model::TrackId<'_>>` found struct `rspotify::rspotify_model::TrackId<'_>` help: try wrapping the expression in `Some` | 259 | None => Some(track.id?), | +++++ + error[E0308]: `match` arms have incompatible types --> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/spotify_player-0.19.1/src/state/model.rs:280:25 | 278 | let id = match track.linked_from { | ______________________- 279 | | Some(d) => d.id, | | ---- this is found to be of type `std::option::Option<rspotify::rspotify_model::TrackId<'_>>` 280 | | None => track.id?, | | ^^^^^^^^^ expected `Option<TrackId<'_>>`, found `TrackId<'_>` 281 | | }; | |_____________- `match` arms have incompatible types | = note: expected enum `std::option::Option<rspotify::rspotify_model::TrackId<'_>>` found struct `rspotify::rspotify_model::TrackId<'_>` help: try wrapping the expression in `Some` | 280 | None => Some(track.id?), | +++++ + **To Reproduce** Not sure what to add here. I've done a clean rust install and tried to cargo spotify-player. **Expected behaviour** I'd expect a success when installing the application. **Log and backtrace** Please let me know where I could find it. **Screenshots** If applicable, add screenshots to help explain your problem. **Environment** - OS: Ubuntu server 24.04 LTS - Application version: 0.19.1 - Application features: -- cargo install spotify_player --no-default-features --features pulseaudio-backend -- cargo install spotify_player **Additional context** If I download the pre-compiled version, it runs successfully, although it shows "No Playback" option.
kerem 2026-03-14 14:10:23 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@aome510 commented on GitHub (Oct 2, 2024):

Similar to https://github.com/aome510/spotify-player/issues/565#issue-2540661782. Can you try to install with --locked option?

<!-- gh-comment-id:2389922258 --> @aome510 commented on GitHub (Oct 2, 2024): Similar to https://github.com/aome510/spotify-player/issues/565#issue-2540661782. Can you try to install with `--locked` option?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotify-player#1264
No description provided.