From 4b6eee560dd2fbcd35229d0f8f15e1cd49b7dbda Mon Sep 17 00:00:00 2001 From: Steven Fackler Date: Tue, 20 Dec 2016 19:53:37 -0800 Subject: [PATCH] Use try not ? --- postgres-tokio/src/error.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/postgres-tokio/src/error.rs b/postgres-tokio/src/error.rs index 83af97e5..ef178ee7 100644 --- a/postgres-tokio/src/error.rs +++ b/postgres-tokio/src/error.rs @@ -16,7 +16,7 @@ pub enum Error { impl fmt::Display for Error { fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { - fmt.write_str(error::Error::description(self))?; + try!(fmt.write_str(error::Error::description(self))); match *self { Error::Db(ref err, _) => write!(fmt, ": {}", err), Error::Io(ref err) => write!(fmt, ": {}", err),