Skip to content

Commit

Permalink
Merge pull request #490 from SebRollen/playable-id-impl
Browse files Browse the repository at this point in the history
add derivable traits to PlayableId and PlayContextId
  • Loading branch information
ramsayleung authored Aug 22, 2024
2 parents c38948f + 9ecd74c commit 383876f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
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

0 comments on commit 383876f

Please sign in to comment.