ramsayleung / rspotify

Spotify Web API SDK implemented on Rust
MIT License
632 stars 121 forks source link

Workaround for Spotify API bug #457

Closed m-torhan closed 7 months ago

m-torhan commented 7 months ago

Description

https://github.com/ramsayleung/rspotify/issues/452 Due to Spotify API returning floats instead of uints for some fields of the Artist it cannot be parsed. This commit adds deserializing float values into u32 as a workaround.

Motivation and Context

Please also include relevant motivation and context.

Dependencies

None

Type of change

Please delete options that are not relevant.

How has this been tested?

Tested using https://github.com/aome510/spotify-player, after this fix the artist's page loaded successfully.

Is this change properly documented?

Yes

ramsayleung commented 7 months ago

The CI tasks failed, you could fix the cargo clippy error and re-run the cargo clippy command as what Github Action does before pushing the commit.

m-torhan commented 7 months ago

Fixed issues and run clippy locally. Now it should pass