Skip to content

Commit 7142798

Browse files
committed
Fix some clippy lints.
1 parent 6eebc83 commit 7142798

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/http/fields.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ pub(crate) fn header_map_to_wasi(header_map: &HeaderMap) -> Result<Fields, ToWas
2020
for (key, value) in header_map {
2121
// Unwrap because `HeaderMap` has already validated the headers.
2222
wasi_fields
23-
.append(&key.as_str(), &value.as_bytes())
23+
.append(key.as_str(), value.as_bytes())
2424
.map_err(|error| ToWasiHeaderError {
2525
error,
2626
context: format!("header {key}: {value:?}"),

src/http/request.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ pub(crate) fn try_into_outgoing<T>(request: Request<T>) -> Result<(OutgoingReque
4242
// Set the url path + query string
4343
if let Some(p_and_q) = parts.uri.path_and_query() {
4444
wasi_req
45-
.set_path_with_query(Some(&p_and_q.as_str()))
45+
.set_path_with_query(Some(p_and_q.as_str()))
4646
.map_err(|()| {
4747
Error::other(format!("path and query rejected by wasi-http {p_and_q:?}"))
4848
})?;

src/http/server.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ impl Responder {
109109
if let Some(len) = body.len() {
110110
let mut buffer = itoa::Buffer::new();
111111
wasi_headers
112-
.append(&CONTENT_LENGTH.as_str(), &buffer.format(len).as_bytes())
112+
.append(CONTENT_LENGTH.as_str(), buffer.format(len).as_bytes())
113113
.unwrap();
114114
}
115115

@@ -171,7 +171,7 @@ impl Finished {
171171
drop(stream);
172172

173173
// If there was an I/O error, panic and don't call `OutgoingBody::finish`.
174-
let _ = result.expect("I/O error while writing the body");
174+
result.expect("I/O error while writing the body");
175175

176176
let wasi_trailers =
177177
trailers.map(|trailers| header_map_to_wasi(&trailers).expect("header error"));

0 commit comments

Comments
 (0)