From 6364794c8e41ae0fbb208bf23a90dda7f9151e70 Mon Sep 17 00:00:00 2001 From: asonix Date: Tue, 22 Nov 2022 18:16:34 -0600 Subject: [PATCH] Clippy --- .../src/lib.rs | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/http-signature-normalization-reqwest/src/lib.rs b/http-signature-normalization-reqwest/src/lib.rs index 382ce08..fb892c3 100644 --- a/http-signature-normalization-reqwest/src/lib.rs +++ b/http-signature-normalization-reqwest/src/lib.rs @@ -206,16 +206,14 @@ where E: From, K: Display, { - if config.set_date { - if !req.headers().contains_key("date") { - req.headers_mut().insert( - "date", - HttpDate::from(SystemTime::now()) - .to_string() - .try_into() - .map_err(SignError::from)?, - ); - } + if config.set_date && !req.headers().contains_key("date") { + req.headers_mut().insert( + "date", + HttpDate::from(SystemTime::now()) + .to_string() + .try_into() + .map_err(SignError::from)?, + ); } let mut bt = std::collections::BTreeMap::new(); for (k, v) in req.headers().iter() {