aboutsummaryrefslogtreecommitdiff
path: root/src/ssl/error.rs
diff options
context:
space:
mode:
authorSteven Fackler <[email protected]>2015-01-23 10:21:08 -0800
committerSteven Fackler <[email protected]>2015-01-23 10:21:08 -0800
commit0a258a0a2128749be84448bdd6819eaff38d4c70 (patch)
tree2b7327e35b5b90195431f36527ee77572be48066 /src/ssl/error.rs
parentMerge pull request #145 from gkoz/ffi_fixes (diff)
downloadrust-openssl-0a258a0a2128749be84448bdd6819eaff38d4c70.tar.xz
rust-openssl-0a258a0a2128749be84448bdd6819eaff38d4c70.zip
Fix for upstream changes
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 {