diff --git a/src/result.rs b/src/result.rs index 41783cb9..07d6a5b9 100644 --- a/src/result.rs +++ b/src/result.rs @@ -34,3 +34,9 @@ pub enum ZipError { #[error("invalid password for file in archive")] InvalidPassword, } + +impl From for io::Error { + fn from(err: ZipError) -> io::Error { + io::Error::new(io::ErrorKind::Other, err) + } +}