Skip to content

Commit

Permalink
Formating changes
Browse files Browse the repository at this point in the history
  • Loading branch information
potatoes1286 authored Jul 24, 2024
1 parent 37b9f88 commit 4b13b0d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/api/api_models.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,13 +197,18 @@ pub struct PlaylistOwner {
pub display_name: String,
}

const def_image: &'static [Image] = &[Image {url: String::new(), height: Some(640), width: Some(640)}];
const EMPTY_IMAGE: &'static [Image] = &[Image {
url: String::new(),
height: Some(640),
width: Some(640),
}];


impl WithImages for Playlist {
fn images(&self) -> &[Image] {
match &self.images {
Some(x) => &x[..],
None => &def_image[..],
None => &EMPTY_IMAGE[..],
}
}
}
Expand Down

0 comments on commit 4b13b0d

Please sign in to comment.