Skip to content

Commit

Permalink
Remove unnecessary _type fields
Browse files Browse the repository at this point in the history
  • Loading branch information
marioortizmanero committed Sep 6, 2021
1 parent f85d5e8 commit cbde27d
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 24 deletions.
4 changes: 0 additions & 4 deletions rspotify-model/src/album.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ pub struct SimplifiedAlbum {
pub release_date_precision: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub restrictions: Option<Restriction>,
#[serde(rename = "type")]
pub _type: Type,
}

/// Full Album Object
Expand All @@ -56,8 +54,6 @@ pub struct FullAlbum {
pub release_date: String,
pub release_date_precision: DatePrecision,
pub tracks: Page<SimplifiedTrack>,
#[serde(rename = "type")]
pub _type: Type,
}

/// Full Albums wrapped by Vec object
Expand Down
4 changes: 0 additions & 4 deletions rspotify-model/src/artist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ pub struct SimplifiedArtist {
pub href: Option<String>,
pub id: Option<ArtistId>,
pub name: String,
#[serde(rename = "type")]
pub _type: Type,
}

/// Full Artist Object
Expand All @@ -32,8 +30,6 @@ pub struct FullArtist {
pub images: Vec<Image>,
pub name: String,
pub popularity: u32,
#[serde(rename = "type")]
pub _type: Type,
}

/// Full artist object wrapped by `Vec`
Expand Down
2 changes: 0 additions & 2 deletions rspotify-model/src/audio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ pub struct AudioFeatures {
pub tempo: f32,
pub time_signature: i32,
pub track_href: String,
#[serde(rename = "type")]
pub _type: String,
pub valence: f32,
}

Expand Down
4 changes: 0 additions & 4 deletions rspotify-model/src/playlist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ pub struct SimplifiedPlaylist {
pub public: Option<bool>,
pub snapshot_id: String,
pub tracks: PlaylistTracksRef,
#[serde(rename = "type")]
pub _type: Type,
}

/// Full playlist object
Expand All @@ -60,8 +58,6 @@ pub struct FullPlaylist {
pub public: Option<bool>,
pub snapshot_id: String,
pub tracks: Page<PlaylistItem>,
#[serde(rename = "type")]
pub _type: Type,
}

/// Playlist track object
Expand Down
6 changes: 0 additions & 6 deletions rspotify-model/src/track.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ pub struct FullTrack {
pub popularity: u32,
pub preview_url: Option<String>,
pub track_number: u32,
#[serde(rename = "type")]
pub _type: Type,
}

/// Track link object
Expand All @@ -47,8 +45,6 @@ pub struct TrackLink {
pub external_urls: HashMap<String, String>,
pub href: String,
pub id: TrackId,
#[serde(rename = "type")]
pub _type: Type,
}

/// Full track wrapped by `Vec`
Expand Down Expand Up @@ -84,8 +80,6 @@ pub struct SimplifiedTrack {
pub name: String,
pub preview_url: Option<String>,
pub track_number: u32,
#[serde(rename = "type")]
pub _type: Type,
}

/// Saved track object
Expand Down
4 changes: 0 additions & 4 deletions rspotify-model/src/user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ pub struct PublicUser {
pub id: UserId,
#[serde(default = "Vec::new")]
pub images: Vec<Image>,
#[serde(rename = "type")]
pub _type: Type,
}

/// Private user object
Expand All @@ -37,8 +35,6 @@ pub struct PrivateUser {
pub id: UserId,
pub images: Option<Vec<Image>>,
pub product: Option<SubscriptionLevel>,
#[serde(rename = "type")]
pub _type: Type,
}

/// Explicit content setting object
Expand Down

0 comments on commit cbde27d

Please sign in to comment.