refactor(lib): replace 'try' macro with '?'

This commit is contained in:
Sean McArthur
2019-01-18 14:29:12 -08:00
parent 6bce753f32
commit c69d1094b3
3 changed files with 7 additions and 4 deletions

View File

@@ -141,7 +141,10 @@ where
S: Http1Transaction,
{
loop {
match try!(S::parse(&mut self.read_buf, ParseContext { cached_headers: ctx.cached_headers, req_method: ctx.req_method, })) {
match S::parse(&mut self.read_buf, ParseContext {
cached_headers: ctx.cached_headers,
req_method: ctx.req_method,
})? {
Some(msg) => {
debug!("parsed {} headers", msg.head.headers.len());
return Ok(Async::Ready(msg))