summaryrefslogtreecommitdiff
path: root/src/error.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/error.rs')
-rw-r--r--src/error.rs11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/error.rs b/src/error.rs
index 916cc51..ade9001 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -2,6 +2,7 @@ use libc;
use std::error;
use std::ffi::NulError;
use std::fmt;
+use std::io;
use std::str;
use {raw, Session};
@@ -139,13 +140,13 @@ impl Error {
}
}
-impl From<Error> for std::io::Error {
- fn from(err: Error) -> std::io::Error {
+impl From<Error> for io::Error {
+ fn from(err: Error) -> io::Error {
let kind = match err.code {
- raw::LIBSSH2_ERROR_EAGAIN => std::io::ErrorKind::WouldBlock,
- _ => std::io::ErrorKind::Other,
+ raw::LIBSSH2_ERROR_EAGAIN => io::ErrorKind::WouldBlock,
+ _ => io::ErrorKind::Other,
};
- std::io::Error::new(kind, err.msg)
+ io::Error::new(kind, err.msg)
}
}