aboutsummaryrefslogtreecommitdiff
path: root/src/ssl/error.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/ssl/error.rs')
-rw-r--r--src/ssl/error.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ssl/error.rs b/src/ssl/error.rs
index c52879a0..4f05e449 100644
--- a/src/ssl/error.rs
+++ b/src/ssl/error.rs
@@ -3,6 +3,7 @@ pub use self::OpensslError::*;
use libc::c_ulong;
use std::error;
+use std::fmt;
use std::ffi::c_str_to_bytes;
use std::io::IoError;
@@ -19,6 +20,12 @@ pub enum SslError {
OpenSslErrors(Vec<OpensslError>)
}
+impl fmt::Display for SslError {
+ fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
+ fmt.write_str(error::Error::description(self))
+ }
+}
+
impl error::Error for SslError {
fn description(&self) -> &str {
match *self {