improve style

This commit is contained in:
Astro 2018-09-06 23:57:42 +02:00
commit f4007511ea
7 changed files with 37 additions and 108 deletions

View file

@ -100,7 +100,7 @@ impl Stream for Component {
Ok(Async::NotReady) => (),
Ok(Async::Ready(())) => (),
Err(e) =>
return Err(e.into()),
return Err(e)?,
};
// Poll stream
@ -123,7 +123,7 @@ impl Stream for Component {
Ok(Async::NotReady)
},
Err(e) =>
Err(e.into()),
Err(e)?,
}
},
}
@ -146,7 +146,7 @@ impl Sink for Component {
Ok(AsyncSink::Ready)
},
Err(e) =>
Err(e.into()),
Err(e)?,
},
_ =>
Ok(AsyncSink::NotReady(item)),