aome510 / spotify-player

A Spotify player in the terminal with full feature parity
MIT License
3.63k stars 166 forks source link

Error on cargo install #568

Closed armanhi closed 1 month ago

armanhi commented 1 month ago

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

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

aome510 commented 1 month ago

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