Anime: Enabled setting builtin animations

This commit is contained in:
Luke D. Jones
2023-06-21 13:34:08 +12:00
parent a0529e0efd
commit cd5daa17d0
15 changed files with 420 additions and 247 deletions

View File

@@ -24,12 +24,14 @@ pub enum AnimeError {
DataBufferLength,
PixelGifWidth(usize),
PixelGifHeight(usize),
ParseError(String),
}
impl fmt::Display for AnimeError {
#[inline]
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
AnimeError::ParseError(e) => write!(f, "Could not parse {e}"),
AnimeError::NoFrames => write!(f, "No frames in PNG"),
AnimeError::Io(e) => write!(f, "Could not open: {}", e),
AnimeError::Png(e) => write!(f, "PNG error: {}", e),