Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add derivable traits to PlayableId and PlayContextId #490

Merged
merged 2 commits into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
## 0.13.0 (2024.03.08)

**New features**
- ([#490](https://github.com/ramsayleung/rspotify/pull/490)) Add impls for `Clone`, `Debug`, `PartialEq`, `Eq`, `Serialize` and `Hash` for `PlayContextId` and `PlayableId`
- ([#458](https://github.com/ramsayleung/rspotify/pull/458)) Support for the `wasm32-unknown-unknown` build target

**Bugfixes**
Expand Down
2 changes: 2 additions & 0 deletions rspotify-model/src/idtypes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,7 @@ define_idtypes!(
/// Grouping up multiple kinds of IDs to treat them generically. This also
/// implements [`Id`], and [`From`] to instantiate it.
#[enum_dispatch(Id)]
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Hash)]
pub enum PlayContextId<'a> {
Artist(ArtistId<'a>),
Album(AlbumId<'a>),
Expand Down Expand Up @@ -521,6 +522,7 @@ impl<'a> PlayContextId<'a> {
/// Grouping up multiple kinds of IDs to treat them generically. This also
/// implements [`Id`] and [`From`] to instantiate it.
#[enum_dispatch(Id)]
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Hash)]
pub enum PlayableId<'a> {
Track(TrackId<'a>),
Episode(EpisodeId<'a>),
Expand Down
Loading