mirror of
https://git.asonix.dog/asonix/http-signature-normalization.git
synced 2024-11-21 17:00:59 +00:00
Clippy
This commit is contained in:
parent
efc55fd9a1
commit
92a6f53dd6
2 changed files with 9 additions and 11 deletions
|
@ -504,7 +504,7 @@ impl Config {
|
|||
|
||||
let unsigned = self
|
||||
.config
|
||||
.begin_sign(&method.to_string(), &path_and_query, headers)?;
|
||||
.begin_sign(method.as_ref(), &path_and_query, headers)?;
|
||||
|
||||
Ok(self::create::Unsigned { unsigned })
|
||||
}
|
||||
|
@ -528,7 +528,7 @@ impl Config {
|
|||
|
||||
let unverified = self
|
||||
.config
|
||||
.begin_verify(&method.to_string(), &path_and_query, headers)?;
|
||||
.begin_verify(method.as_ref(), &path_and_query, headers)?;
|
||||
|
||||
Ok(unverified)
|
||||
}
|
||||
|
|
|
@ -67,15 +67,13 @@ where
|
|||
E: From<JoinError> + From<PrepareSignError> + std::fmt::Debug + Send + 'static,
|
||||
K: Display,
|
||||
{
|
||||
if config.set_date {
|
||||
if !request.headers().contains_key("date") {
|
||||
request.headers_mut().insert(
|
||||
actix_http::header::DATE,
|
||||
HttpDate::from(SystemTime::now())
|
||||
.try_into_value()
|
||||
.expect("Date is valid"),
|
||||
);
|
||||
}
|
||||
if config.set_date && !request.headers().contains_key("date") {
|
||||
request.headers_mut().insert(
|
||||
actix_http::header::DATE,
|
||||
HttpDate::from(SystemTime::now())
|
||||
.try_into_value()
|
||||
.expect("Date is valid"),
|
||||
);
|
||||
}
|
||||
|
||||
let mut headers = request.headers().clone();
|
||||
|
|
Loading…
Reference in a new issue