diff options
Diffstat (limited to 'src/error.rs')
-rw-r--r-- | src/error.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/error.rs b/src/error.rs index 76a120b..7118fa9 100644 --- a/src/error.rs +++ b/src/error.rs @@ -1,15 +1,15 @@ use std::fmt; -use std::kinds::marker; use std::str; use libc; use {raw, Session}; /// Representation of an error that can occur within libssh2 +#[derive(Show)] +#[allow(missing_copy_implementations)] pub struct Error { code: libc::c_int, msg: &'static str, - marker: marker::NoCopy, } impl Error { @@ -33,7 +33,6 @@ impl Error { Error { code: code, msg: msg, - marker: marker::NoCopy, } } @@ -102,7 +101,7 @@ impl Error { pub fn code(&self) -> libc::c_int { self.code } } -impl fmt::Show for Error { +impl fmt::String for Error { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "[{}] {}", self.code, self.msg) } |