Start reading in indexed PNG file
This commit is contained in:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user