diff --git a/src/api/api_models.rs b/src/api/api_models.rs index acddda26..aa960db0 100644 --- a/src/api/api_models.rs +++ b/src/api/api_models.rs @@ -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[..], } } }