From a5f7a67b4d28028e3ecacadec1e082f6ff81a54c Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Fri, 6 Jul 2018 08:24:44 +0600 Subject: [PATCH] clippy warnings --- src/client/request.rs | 7 +++---- tests/test_ws.rs | 1 - 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/client/request.rs b/src/client/request.rs index ef058373b..650f0eeaa 100644 --- a/src/client/request.rs +++ b/src/client/request.rs @@ -429,14 +429,13 @@ impl ClientRequestBuilder { { if let Some(parts) = parts(&mut self.request, &self.err) { match HeaderName::try_from(key) { - Ok(key) => match parts.headers.contains_key(&key) { - false => match value.try_into() { + Ok(key) => if !parts.headers.contains_key(&key) { + match value.try_into() { Ok(value) => { parts.headers.insert(key, value); } Err(e) => self.err = Some(e.into()), - }, - true => (), + } }, Err(e) => self.err = Some(e.into()), }; diff --git a/tests/test_ws.rs b/tests/test_ws.rs index 96d97b824..66a9153dc 100644 --- a/tests/test_ws.rs +++ b/tests/test_ws.rs @@ -9,7 +9,6 @@ use bytes::Bytes; use futures::Stream; use rand::distributions::Alphanumeric; use rand::Rng; -use std::time::Duration; #[cfg(feature = "alpn")] extern crate openssl;