1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
use std::fmt::{self, Debug, Display, Formatter};
use zip::result::ZipError;
pub struct Error(pub(crate) ZipError);
impl Debug for Error { fn fmt(&self, fmt: &mut Formatter) -> fmt::Result { Debug ::fmt(&self.0, fmt) } }
impl Display for Error { fn fmt(&self, fmt: &mut Formatter) -> fmt::Result { Display::fmt(&self.0, fmt) } }
impl std::error::Error for Error {}
impl Error {
pub(crate) fn unsupported(s: &'static str) -> Self { Self(ZipError::UnsupportedArchive(s)) }
}
pub type Result<T> = std::result::Result<T, Error>;