Make gzip an optional feature (default off)

This commit is contained in:
Sean McArthur
2019-09-19 11:11:24 -07:00
parent f4100e4148
commit f71227d968
10 changed files with 289 additions and 195 deletions

View File

@@ -99,6 +99,7 @@ impl Error {
self
}
#[allow(unused)]
pub(crate) fn into_io(self) -> io::Error {
io::Error::new(io::ErrorKind::Other, self)
}
@@ -214,11 +215,12 @@ pub(crate) fn url_bad_scheme(url: Url) -> Error {
// io::Error helpers
#[cfg(feature = "blocking")]
#[allow(unused)]
pub(crate) fn into_io(e: Error) -> io::Error {
e.into_io()
}
#[allow(unused)]
pub(crate) fn decode_io(e: io::Error) -> Error {
if e.get_ref().map(|r| r.is::<Error>()).unwrap_or(false) {
*e.into_inner()