perf(h1): remove unused error branches from writing body

This commit is contained in:
Sean McArthur
2018-05-07 11:19:19 -07:00
parent 325b7e519a
commit 0d104deced
2 changed files with 7 additions and 19 deletions

View File

@@ -242,7 +242,7 @@ where
},
Async::Ready(None) => {
if self.conn.can_write_body() {
self.conn.write_body(None).map_err(::Error::new_body_write)?;
self.conn.write_body(None);
}
continue;
},
@@ -253,7 +253,7 @@ where
};
if self.conn.can_write_body() {
self.conn.write_body(Some(chunk)).map_err(::Error::new_body_write)?;
self.conn.write_body(Some(chunk));
// This allows when chunk is `None`, or `Some([])`.
} else if chunk.remaining() == 0 {
// ok