mirror of
https://github.com/ramsayleung/rspotify.git
synced 2026-04-26 07:55:55 +03:00
[PR #177] [MERGED] Serialize enum as number #290
Labels
No labels
Stale
bug
discussion
enhancement
good first issue
good first issue
help wanted
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/rspotify#290
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ramsayleung/rspotify/pull/177
Author: @ramsayleung
Created: 1/13/2021
Status: ✅ Merged
Merged: 1/18/2021
Merged by: @marioortizmanero
Base:
master← Head:ramsay_serialize_enum_to_int📝 Commits (10+)
a40b488addmodalityenum35664b1changemodefrom f32 to enumModalitye3734d9add comments68691fbUpdate CHANGELOGbf52cfeadd test for AudioAnalysisTrack9284618fix cargo fmt error97c3a32Move Duration serializer/deserializer into mod duration_msf10723cMove millisecond_timestamp deserializer/serializer into mod millisecond_timestampea9f514Move option_duration_ms deserializer/serializer into mod option_duration_msbbcba86Update CHANGELOG📊 Changes
9 files changed (+212 additions, -158 deletions)
View changed files
📝
CHANGELOG.md(+2 -0)📝
src/model/audio.rs(+8 -9)📝
src/model/context.rs(+5 -20)📝
src/model/enums/misc.rs(+12 -0)📝
src/model/mod.rs(+140 -97)📝
src/model/offset.rs(+2 -5)📝
src/model/show.rs(+4 -16)📝
src/model/track.rs(+3 -11)📝
tests/test_models.rs(+36 -0)📄 Description
Description
AudioAnalysisSection::mode,AudioAnalysisTrack::modeandAudioFeatures::modeare f32s but should beModalitywhereenum Modality { Major, Minor, NoResult }from(to)_millisecond_timestampinto its modulemillisecond_timestampand rename them todeserialize&serializefrom(to)_duration_msinto its moduleduration_msand rename them todeserialize&serializefrom(to)_option_duration_msinto its moduleoption_duration_msand rename them todeserialize&serializeMotivation and Context
To make the API more ergonomic and easier to use.
Dependencies
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.
Please also list any relevant details for your test configuration
AudioAnalysisSection:test_audio_analysis_sectionAudioFeatures:test_audio_featuresAudioAnalysisTrack:test_audio_analysis_track🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.