Skip to content

Commit

Permalink
[zune-jpegxl] Implement Display and Error for JxlEncodeErrors
Browse files Browse the repository at this point in the history
  • Loading branch information
Enet4 authored and etemesi254 committed Oct 20, 2024
1 parent b3b244d commit c9f333d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions crates/zune-jpegxl/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,12 @@ impl From<ZByteIoError> for JxlEncodeErrors {
JxlEncodeErrors::IoErrors(value)
}
}

impl core::fmt::Display for JxlEncodeErrors {
fn fmt(&self, f: &mut Formatter<'_>) -> core::fmt::Result {
writeln!(f, "{:?}", self)
}
}

#[cfg(feature = "std")]
impl std::error::Error for JxlEncodeErrors {}

0 comments on commit c9f333d

Please sign in to comment.