[GH-ISSUE #565] Compilation failure #1263

Closed
opened 2026-03-14 14:09:31 +03:00 by kerem · 2 comments
Owner

Originally created by @sewnie on GitHub (Sep 22, 2024).
Original GitHub issue: https://github.com/aome510/spotify-player/issues/565

To Reproduce
cargo install --git https://github.com/aome510/spotify-player --no-default-features --features pulseaudio-backend,streaming,lyric-finder,media-control,sixel,notify

Log and backtrace

   Compiling spotify_player v0.19.1 (/home/sewn/.local/share/cargo/git/checkouts/spotify-player-0153bcdf5a6f452d/9c47701/spotify_player)
error[E0308]: `match` arms have incompatible types
   --> spotify_player/src/state/model.rs:293:25
    |
291 |               let id = match track.linked_from {
    |  ______________________-
292 | |                 Some(d) => d.id,
    | |                            ---- this is found to be of type `std::option::Option<rspotify::rspotify_model::TrackId<'_>>`
293 | |                 None => track.id?,
    | |                         ^^^^^^^^^ expected `Option<TrackId<'_>>`, found `TrackId<'_>`
294 | |             };
    | |_____________- `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`
    |
293 |                 None => Some(track.id?),
    |                         +++++         +

error[E0308]: `match` arms have incompatible types
   --> spotify_player/src/state/model.rs:314:25
    |
312 |               let id = match track.linked_from {
    |  ______________________-
313 | |                 Some(d) => d.id,
    | |                            ---- this is found to be of type `std::option::Option<rspotify::rspotify_model::TrackId<'_>>`
314 | |                 None => track.id?,
    | |                         ^^^^^^^^^ expected `Option<TrackId<'_>>`, found `TrackId<'_>`
315 | |             };
    | |_____________- `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`
    |
314 |                 None => Some(track.id?),
    |                         +++++         +

For more information about this error, try `rustc --explain E0308`.
error: could not compile `spotify_player` (bin "spotify_player") due to 2 previous errors
error: failed to compile `spotify_player v0.19.1 (https://github.com/aome510/spotify-player#9c47701c)`, intermediate artifacts can be found at `/tmp/cargo-installca5iIY`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
Originally created by @sewnie on GitHub (Sep 22, 2024). Original GitHub issue: https://github.com/aome510/spotify-player/issues/565 **To Reproduce** `cargo install --git https://github.com/aome510/spotify-player --no-default-features --features pulseaudio-backend,streaming,lyric-finder,media-control,sixel,notify` **Log and backtrace** ``` Compiling spotify_player v0.19.1 (/home/sewn/.local/share/cargo/git/checkouts/spotify-player-0153bcdf5a6f452d/9c47701/spotify_player) error[E0308]: `match` arms have incompatible types --> spotify_player/src/state/model.rs:293:25 | 291 | let id = match track.linked_from { | ______________________- 292 | | Some(d) => d.id, | | ---- this is found to be of type `std::option::Option<rspotify::rspotify_model::TrackId<'_>>` 293 | | None => track.id?, | | ^^^^^^^^^ expected `Option<TrackId<'_>>`, found `TrackId<'_>` 294 | | }; | |_____________- `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` | 293 | None => Some(track.id?), | +++++ + error[E0308]: `match` arms have incompatible types --> spotify_player/src/state/model.rs:314:25 | 312 | let id = match track.linked_from { | ______________________- 313 | | Some(d) => d.id, | | ---- this is found to be of type `std::option::Option<rspotify::rspotify_model::TrackId<'_>>` 314 | | None => track.id?, | | ^^^^^^^^^ expected `Option<TrackId<'_>>`, found `TrackId<'_>` 315 | | }; | |_____________- `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` | 314 | None => Some(track.id?), | +++++ + For more information about this error, try `rustc --explain E0308`. error: could not compile `spotify_player` (bin "spotify_player") due to 2 previous errors error: failed to compile `spotify_player v0.19.1 (https://github.com/aome510/spotify-player#9c47701c)`, intermediate artifacts can be found at `/tmp/cargo-installca5iIY`. To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path. ```
kerem 2026-03-14 14:09:31 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@aome510 commented on GitHub (Sep 22, 2024):

maybe similar to https://github.com/aome510/spotify-player/issues/560#issuecomment-2332532375? Can you try with --locked option?

<!-- gh-comment-id:2366855759 --> @aome510 commented on GitHub (Sep 22, 2024): maybe similar to https://github.com/aome510/spotify-player/issues/560#issuecomment-2332532375? Can you try with `--locked` option?
Author
Owner

@sewnie commented on GitHub (Sep 22, 2024):

Yes. Gotta love rust.

<!-- gh-comment-id:2366868871 --> @sewnie commented on GitHub (Sep 22, 2024): Yes. Gotta love rust.
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#1263
No description provided.