Deconstruct PNG imag

This commit is contained in:
Jaby
2022-09-25 16:31:11 +02:00
committed by Jaby
parent 7b18faabe3
commit bc83d6078b
2 changed files with 38 additions and 3 deletions

View File

@@ -15,6 +15,10 @@ pub struct Error {
impl Error {
const DEFAULT_EXITCODE:i32 = -1;
pub fn from_str(str: &str) -> Error {
Self::from_text(str.to_owned())
}
pub fn from_text(text: String) -> Error {
Error{exit_code: Self::DEFAULT_EXITCODE, action: String::new(), text}
}