diff --git a/src/body.rs b/src/body.rs index a1bff3e..6188f29 100644 --- a/src/body.rs +++ b/src/body.rs @@ -106,9 +106,9 @@ impl From for Body { impl fmt::Debug for Kind { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - match self { - &Kind::Reader(_, ref v) => f.debug_tuple("Kind::Reader").field(&"_").field(v).finish(), - &Kind::Bytes(ref v) => f.debug_tuple("Kind::Bytes").field(v).finish(), + match *self { + Kind::Reader(_, ref v) => f.debug_tuple("Kind::Reader").field(&"_").field(v).finish(), + Kind::Bytes(ref v) => f.debug_tuple("Kind::Bytes").field(v).finish(), } } } @@ -118,7 +118,7 @@ impl fmt::Debug for Kind { //pub struct Pipe(Kind); -pub fn as_hyper_body<'a>(body: &'a mut Body) -> ::hyper::client::Body<'a> { +pub fn as_hyper_body(body: &mut Body) -> ::hyper::client::Body { match body.reader { Kind::Bytes(ref bytes) => { let len = bytes.len(); diff --git a/src/error.rs b/src/error.rs index b624bce..ced68f1 100644 --- a/src/error.rs +++ b/src/error.rs @@ -46,7 +46,7 @@ impl StdError for Error { match *self { Error::Http(ref e) => Some(e), Error::Serialize(ref e) => Some(&**e), - Error::TooManyRedirects => None, + Error::TooManyRedirects | Error::RedirectLoop => None, Error::__DontMatchMe => unreachable!() }