perf(http2): reduce empty EOS frames if end is already known

This commit is contained in:
Sean McArthur
2018-04-18 16:35:53 -07:00
parent a4eb612bd5
commit 38eba1540f
3 changed files with 20 additions and 8 deletions

View File

@@ -191,8 +191,8 @@ impl Error {
Error::new(Kind::Body, Some(cause.into()))
}
pub(crate) fn new_body_write(cause: io::Error) -> Error {
Error::new(Kind::BodyWrite, Some(Box::new(cause)))
pub(crate) fn new_body_write<E: Into<Cause>>(cause: E) -> Error {
Error::new(Kind::BodyWrite, Some(cause.into()))
}
pub(crate) fn new_user_unsupported_version() -> Error {