mirror of
https://github.com/Ap0dexMe0/unixtract.git
synced 2026-07-16 05:04:22 +02:00
unify error and success handling in extractors
This commit is contained in:
@@ -39,8 +39,7 @@ pub fn extract_invincible_image(app_ctx: &AppContext, _ctx: Box<dyn Any>) -> Res
|
||||
}
|
||||
|
||||
if header.file_version[0] != 3 {
|
||||
println!("\nSorry, this version of the file is not supported!");
|
||||
return Ok(())
|
||||
return Err("Unsupported format version! (Only 3 is supported right now)".into());
|
||||
}
|
||||
|
||||
let mut encrypted_data = Vec::new();
|
||||
@@ -77,7 +76,5 @@ pub fn extract_invincible_image(app_ctx: &AppContext, _ctx: Box<dyn Any>) -> Res
|
||||
i += 1;
|
||||
}
|
||||
|
||||
println!("\nExtraction finished!");
|
||||
|
||||
Ok(())
|
||||
}
|
||||
Reference in New Issue
Block a user