diff options
| author | johnthagen <[email protected]> | 2017-10-03 17:44:02 -0400 |
|---|---|---|
| committer | johnthagen <[email protected]> | 2017-10-03 17:44:02 -0400 |
| commit | b5bb8de4f2bd18735346a6062a13d95bcf82bdee (patch) | |
| tree | 11a6f6d11bc412fc89a4bfb3517ced56bf047012 /openssl/src/ssl/error.rs | |
| parent | Merge pull request #743 from AndyGauge/doc-asn1 (diff) | |
| download | rust-openssl-b5bb8de4f2bd18735346a6062a13d95bcf82bdee.tar.xz rust-openssl-b5bb8de4f2bd18735346a6062a13d95bcf82bdee.zip | |
Convert try! usage to ?
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)?; } } } |