diff options
| author | Andy Gauge <[email protected]> | 2017-10-09 12:10:04 -0700 |
|---|---|---|
| committer | Andy Gauge <[email protected]> | 2017-10-09 12:10:04 -0700 |
| commit | 2c7f0e7604e758d2ba7f6f39ab78d8302f484f65 (patch) | |
| tree | b939ebd1ac58177ad4e7a8f25b488f8fe41cd61f /openssl/src/ssl/error.rs | |
| parent | Begun DSA documentation (diff) | |
| parent | Merge pull request #753 from zsck/issue719 (diff) | |
| download | rust-openssl-2c7f0e7604e758d2ba7f6f39ab78d8302f484f65.tar.xz rust-openssl-2c7f0e7604e758d2ba7f6f39ab78d8302f484f65.zip | |
Merge branch 'master' of https://github.com/sfackler/rust-openssl
Diffstat (limited to 'openssl/src/ssl/error.rs')
| -rw-r--r-- | openssl/src/ssl/error.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/openssl/src/ssl/error.rs b/openssl/src/ssl/error.rs index 74782d7a..db78e2c8 100644 --- a/openssl/src/ssl/error.rs +++ b/openssl/src/ssl/error.rs @@ -28,7 +28,7 @@ pub enum Error { impl fmt::Display for Error { fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { - try!(fmt.write_str(self.description())); + fmt.write_str(self.description())?; if let Some(err) = self.cause() { write!(fmt, ": {}", err) } else { @@ -98,14 +98,14 @@ impl<S: Any + fmt::Debug> StdError for HandshakeError<S> { impl<S: Any + fmt::Debug> fmt::Display for HandshakeError<S> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - try!(f.write_str(StdError::description(self))); + f.write_str(StdError::description(self))?; match *self { - HandshakeError::SetupFailure(ref e) => try!(write!(f, ": {}", e)), + HandshakeError::SetupFailure(ref e) => write!(f, ": {}", e)?, HandshakeError::Failure(ref s) | HandshakeError::Interrupted(ref s) => { - try!(write!(f, ": {}", s.error())); + write!(f, ": {}", s.error())?; if let Some(err) = s.ssl().verify_result() { - try!(write!(f, ": {}", err)); + write!(f, ": {}", err)?; } } } |