summaryrefslogtreecommitdiffstats
path: root/tokio-uds
diff options
context:
space:
mode:
authorTaiki Endo <te316e89@gmail.com>2019-04-02 05:45:59 +0900
committerCarl Lerche <me@carllerche.com>2019-04-01 13:45:59 -0700
commit599955f716963c443542b9e39910f2c90a9745a5 (patch)
tree01159694b37c5e5af5616a2678f5cdea8d04aae7 /tokio-uds
parent91bb0f73f55bc4e5ebed506acdbfc6591c714289 (diff)
Replace try! macro with ? operator (#1024)
Diffstat (limited to 'tokio-uds')
-rw-r--r--tokio-uds/src/frame.rs2
-rw-r--r--tokio-uds/src/stream.rs4
2 files changed, 3 insertions, 3 deletions
diff --git a/tokio-uds/src/frame.rs b/tokio-uds/src/frame.rs
index dbcf039e..6a417407 100644
--- a/tokio-uds/src/frame.rs
+++ b/tokio-uds/src/frame.rs
@@ -66,7 +66,7 @@ impl<A: AsRef<Path>, C: Encoder> Sink for UnixDatagramFramed<A, C> {
trace!("sending frame");
if !self.flushed {
- match try!(self.poll_complete()) {
+ match self.poll_complete()? {
Async::Ready(()) => {}
Async::NotReady => return Ok(AsyncSink::NotReady(item)),
}
diff --git a/tokio-uds/src/stream.rs b/tokio-uds/src/stream.rs
index 7a1adf5e..dfb0724d 100644
--- a/tokio-uds/src/stream.rs
+++ b/tokio-uds/src/stream.rs
@@ -78,7 +78,7 @@ impl UnixStream {
/// communicating back and forth between one another. Each socket will
/// be associated with the default event loop's handle.
pub fn pair() -> io::Result<(UnixStream, UnixStream)> {
- let (a, b) = try!(mio_uds::UnixStream::pair());
+ let (a, b) = mio_uds::UnixStream::pair()?;
let a = UnixStream::new(a);
let b = UnixStream::new(b);
@@ -262,7 +262,7 @@ impl Future for ConnectFuture {
return Ok(Async::NotReady);
}
- if let Some(e) = try!(stream.io.get_ref().take_error()) {
+ if let Some(e) = stream.io.get_ref().take_error()? {
return Err(e);
}
}