Start reading in indexed PNG file

This commit is contained in:
2022-09-25 19:32:58 +02:00
parent d931cd7a61
commit 530fd10662
3 changed files with 68 additions and 26 deletions

View File

@@ -49,6 +49,11 @@ impl Error {
pub fn ok_or_new<T, F>(option: Option<T>, error_text: F) -> Result<T, Error> where F: Fn () -> String{
Ok(option.ok_or(Error::from_callback(error_text))?)
}
pub fn with_action(mut self, action: &str) -> Error {
self.action = action.to_owned();
self
}
}
impl std::fmt::Display for Error {