Skip to content

Commit 8156c22

Browse files
committed
fix: clippy::single-match in examples/awssig.rs
1 parent be534f7 commit 8156c22

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

examples/awssig.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -310,12 +310,9 @@ http_request_handler!(awssigv4_header_handler, |request: &mut Request| {
310310
// Copy only headers that will be used to sign the request
311311
let mut headers = HeaderMap::new();
312312
for (name, value) in request.headers_in_iterator() {
313-
match name.to_lowercase().as_str() {
314-
"host" => {
315-
headers.insert(http::header::HOST, value.parse().unwrap());
316-
}
317-
&_ => {}
318-
};
313+
if name.to_lowercase() == "host" {
314+
headers.insert(http::header::HOST, value.parse().unwrap());
315+
}
319316
}
320317
headers.insert("X-Amz-Date", datetime_now.parse().unwrap());
321318
ngx_log_debug_http!(request, "headers {:?}", headers);

0 commit comments

Comments
 (0)