ramsayleung / rspotify

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

Update DeviceType to fix json parse error: unknown variant #441

Closed NDoolan360 closed 11 months ago

NDoolan360 commented 1 year ago

Description

Fix json parse error: unknown variant Smartwatch when calling device() method.

Motivation and Context

Fixes https://github.com/ramsayleung/rspotify/issues/440

Type of change

How has this been tested?

I have device with Smartwatch type, calling device() method from my app using rspotify returns error above. Changes from this pull request stop the error occurring and allow the device type 'Smartwatch' to be returned. image

Is this change properly documented?

No changes in docs were made. CHANGELOG entry has been added under bug fix for 12.0.1

ramsayleung commented 1 year ago

The CI jobs fail, perhaps you could fix this clippy error by applying its suggestion.

NDoolan360 commented 11 months ago

Added in the clippy suggestions, fixing the deprecated DateTime::<Utc>::from_utc. Ran clippy locally and got no new complaints.

ramsayleung commented 11 months ago

Merged, thanks for your contribution :)