File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ impl Encoder {
63
63
}
64
64
}
65
65
66
- fn finalize_headers ( & mut self ) -> io :: Result < ( ) > {
66
+ fn finalize_headers ( & mut self ) {
67
67
// If the body isn't streaming, we can set the content-length ahead of time. Else we need to
68
68
// send all items in chunks.
69
69
if let Some ( len) = self . response . len ( ) {
@@ -76,7 +76,6 @@ impl Encoder {
76
76
let date = fmt_http_date ( SystemTime :: now ( ) ) ;
77
77
self . response . insert_header ( DATE , date) ;
78
78
}
79
- Ok ( ( ) )
80
79
}
81
80
82
81
/// Encode the headers to a buffer, the first time we poll.
@@ -86,7 +85,7 @@ impl Encoder {
86
85
let status = self . response . status ( ) ;
87
86
write ! ( head, "HTTP/1.1 {} {}\r \n " , status, reason) ?;
88
87
89
- self . finalize_headers ( ) ? ;
88
+ self . finalize_headers ( ) ;
90
89
let mut headers = self . response . iter ( ) . collect :: < Vec < _ > > ( ) ;
91
90
headers. sort_unstable_by_key ( |( h, _) | h. as_str ( ) ) ;
92
91
for ( header, values) in headers {
You canβt perform that action at this time.
0 commit comments