Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Formating changes
Browse files Browse the repository at this point in the history
potatoes1286 authored Jul 24, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
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
@@ -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[..],
}
}
}

0 comments on commit 4b13b0d

Please sign in to comment.