1
0
mirror of https://github.com/fafhrd91/actix-web synced 2024-11-27 17:52:56 +01:00

Fix clippy warning (#755)

This commit is contained in:
nasa 2019-04-05 18:34:24 +09:00 committed by Douman
parent 309c480782
commit a655bdac52
5 changed files with 6 additions and 6 deletions

View File

@ -359,7 +359,7 @@ where
} }
fn poll_next(&mut self) -> Poll<Option<Bytes>, Error> { fn poll_next(&mut self) -> Poll<Option<Bytes>, Error> {
self.stream.poll().map_err(|e| e.into()) self.stream.poll().map_err(std::convert::Into::into)
} }
} }

View File

@ -68,8 +68,8 @@ impl Key {
encryption_key.copy_from_slice(&both_keys[SIGNED_KEY_LEN..]); encryption_key.copy_from_slice(&both_keys[SIGNED_KEY_LEN..]);
Key { Key {
signing_key: signing_key, signing_key,
encryption_key: encryption_key, encryption_key,
} }
} }

View File

@ -37,7 +37,7 @@ impl<'a> PrivateJar<'a> {
let mut key_array = [0u8; KEY_LEN]; let mut key_array = [0u8; KEY_LEN];
key_array.copy_from_slice(key.encryption()); key_array.copy_from_slice(key.encryption());
PrivateJar { PrivateJar {
parent: parent, parent,
key: key_array, key: key_array,
} }
} }

View File

@ -31,7 +31,7 @@ impl<'a> SignedJar<'a> {
#[doc(hidden)] #[doc(hidden)]
pub fn new(parent: &'a mut CookieJar, key: &Key) -> SignedJar<'a> { pub fn new(parent: &'a mut CookieJar, key: &Key) -> SignedJar<'a> {
SignedJar { SignedJar {
parent: parent, parent,
key: SigningKey::new(HMAC_DIGEST, key.signing()), key: SigningKey::new(HMAC_DIGEST, key.signing()),
} }
} }

View File

@ -414,7 +414,7 @@ impl ClientRequest {
} }
// user agent // user agent
if !self.head.headers.contains_key(&header::USER_AGENT) { if !self.head.headers.contains_key(header::USER_AGENT) {
self.head.headers.insert( self.head.headers.insert(
header::USER_AGENT, header::USER_AGENT,
HeaderValue::from_static(concat!("awc/", env!("CARGO_PKG_VERSION"))), HeaderValue::from_static(concat!("awc/", env!("CARGO_PKG_VERSION"))),