Fix search and playlist parsing crashes from Spotify API nulls and duplicate items - #734
Fix search and playlist parsing crashes from Spotify API nulls and duplicate items#734Kinonear wants to merge 1 commit into
Conversation
|
I believe this might have already been addressed by 6267ec1 were you targeting the same issue? |
|
Hi @jacksongoode, Thanks for the quick response! While commit The Instead of manually wrapping list elements in Additionally, this PR updates the Let me know what you think! |
|
Is there a way to avoid making a Also I believe builds fail. |
|
Hi @jacksongoode, Regarding the build failure, it looks like an environmental cross-compilation issue on the To your question about avoiding the Because Rust/Serde does not support inline closure-style deserializers within If we were to avoid the helper entirely, the only other inline option in Serde is to change the field type of By keeping this small 6-line helper inside |
This PR fixes the crashes caused by recent Spotify Web API changes. It resolves the duplicate field "items" deserialization conflict on /me/playlists and search results, and implements a null-safe deserializer deserialize_ignore_nulls for Page to handle unavailable or region-locked tracks.