Skip to content

Commit

Permalink
Other fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubadamw committed Jan 28, 2024
1 parent 1785a37 commit 3ddb0e9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/async_impl/decoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ impl Decoder {
///
/// This decoder will buffer and decompress chunks that are brotlied.
#[cfg(feature = "brotli")]
fn brotli(body: Body) -> Decoder {
fn brotli(body: ResponseBody) -> Decoder {
use futures_util::StreamExt;

Decoder {
Expand All @@ -154,7 +154,7 @@ impl Decoder {
///
/// This decoder will buffer and decompress chunks that are deflated.
#[cfg(feature = "deflate")]
fn deflate(body: Body) -> Decoder {
fn deflate(body: ResponseBody) -> Decoder {
use futures_util::StreamExt;

Decoder {
Expand Down
4 changes: 1 addition & 3 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,13 @@ impl Error {
matches!(self.inner.kind, Kind::Request)
}

/*
#[cfg(not(target_arch = "wasm32"))]
/// Returns true if the error is related to connect
pub fn is_connect(&self) -> bool {
let mut source = self.source();

while let Some(err) = source {
if let Some(hyper_err) = err.downcast_ref::<hyper::Error>() {
if let Some(hyper_err) = err.downcast_ref::<hyper_util::client::legacy::Error>() {
if hyper_err.is_connect() {
return true;
}
Expand All @@ -139,7 +138,6 @@ impl Error {

false
}
*/

/// Returns true if the error is related to the request or response body
pub fn is_body(&self) -> bool {
Expand Down

0 comments on commit 3ddb0e9

Please sign in to comment.