mirror of
https://github.com/ramsayleung/rspotify.git
synced 2026-04-26 07:55:55 +03:00
[PR #305] [MERGED] Meris/refactor playable playcontext #388
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#388
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/305
Author: @merisbahti
Created: 3/10/2022
Status: ✅ Merged
Merged: 7/13/2022
Merged by: @marioortizmanero
Base:
master← Head:meris/refactor-playable-playcontext📝 Commits (10+)
5e90864fix: start refactora6c0654fix some more refactor62ba63ffix: it compilese43c253More performant version done!cbc1177Almost there0f6d439introduce as_borrowed() for id typese07a0edfix testsb25790aRename as_borrowed to as_ref1799615Fix part of the docs3f787bbConsiderably neater implementation📊 Changes
30 files changed (+680 additions, -532 deletions)
View changed files
📝
CHANGELOG.md(+3 -0)📝
examples/auth_code.rs(+1 -1)📝
examples/auth_code_pkce.rs(+2 -2)📝
examples/client_creds.rs(+2 -2)📝
examples/tasks.rs(+1 -1)📝
examples/ureq/device.rs(+1 -1)📝
examples/ureq/me.rs(+1 -1)📝
examples/ureq/search.rs(+12 -12)📝
examples/ureq/seek_track.rs(+2 -2)📝
examples/ureq/threading.rs(+1 -1)📝
examples/webapp/Cargo.toml(+7 -4)📝
examples/webapp/src/main.rs(+10 -9)📝
examples/with_auto_reauth.rs(+8 -7)📝
examples/with_refresh_token.rs(+7 -6)📝
rspotify-model/Cargo.toml(+1 -1)📝
rspotify-model/src/album.rs(+2 -2)📝
rspotify-model/src/artist.rs(+2 -2)📝
rspotify-model/src/audio.rs(+1 -1)📝
rspotify-model/src/idtypes.rs(+388 -295)📝
rspotify-model/src/lib.rs(+4 -3)...and 10 more files
📄 Description
Description
Basically change the two traits
PlayContextIdandPlayableId, from this:To use enums, like this:
Motivation and Context
So that we don't have to use dynamic dispatch, and don't have to see code like this:
Dependencies
None
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
Is this change properly documented?
Please make sure you've properly documented the changes you're making.
Don't forget to add an entry to the CHANGELOG if necessary (new features, breaking changes, relevant internal improvements).
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.