tidy up some clippy warnings

This commit is contained in:
Sean McArthur
2017-05-05 14:13:54 -07:00
parent 7d457b4f5a
commit b5475f6903
2 changed files with 5 additions and 5 deletions

View File

@@ -106,9 +106,9 @@ impl From<File> for Body {
impl fmt::Debug for Kind { impl fmt::Debug for Kind {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match self { match *self {
&Kind::Reader(_, ref v) => f.debug_tuple("Kind::Reader").field(&"_").field(v).finish(), 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(), 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 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 { match body.reader {
Kind::Bytes(ref bytes) => { Kind::Bytes(ref bytes) => {
let len = bytes.len(); let len = bytes.len();

View File

@@ -46,7 +46,7 @@ impl StdError for Error {
match *self { match *self {
Error::Http(ref e) => Some(e), Error::Http(ref e) => Some(e),
Error::Serialize(ref e) => Some(&**e), Error::Serialize(ref e) => Some(&**e),
Error::TooManyRedirects => None, Error::TooManyRedirects |
Error::RedirectLoop => None, Error::RedirectLoop => None,
Error::__DontMatchMe => unreachable!() Error::__DontMatchMe => unreachable!()
} }