Skip to content

Commit 356847b

Browse files
committed
πŸ“Ž thanks clippy πŸ–‡
1 parent 0678bed commit 356847b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

β€Žsrc/server/encode.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ impl Encoder {
6363
}
6464
}
6565

66-
fn finalize_headers(&mut self) -> io::Result<()> {
66+
fn finalize_headers(&mut self) {
6767
// If the body isn't streaming, we can set the content-length ahead of time. Else we need to
6868
// send all items in chunks.
6969
if let Some(len) = self.response.len() {
@@ -76,7 +76,6 @@ impl Encoder {
7676
let date = fmt_http_date(SystemTime::now());
7777
self.response.insert_header(DATE, date);
7878
}
79-
Ok(())
8079
}
8180

8281
/// Encode the headers to a buffer, the first time we poll.
@@ -86,7 +85,7 @@ impl Encoder {
8685
let status = self.response.status();
8786
write!(head, "HTTP/1.1 {} {}\r\n", status, reason)?;
8887

89-
self.finalize_headers()?;
88+
self.finalize_headers();
9089
let mut headers = self.response.iter().collect::<Vec<_>>();
9190
headers.sort_unstable_by_key(|(h, _)| h.as_str());
9291
for (header, values) in headers {

0 commit comments

Comments
Β (0)