summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWez Furlong <wez@wezfurlong.org>2019-07-24 14:07:00 -0700
committerWez Furlong <wez@wezfurlong.org>2019-07-29 08:55:06 -0700
commit9efb2d664971682278b37eb40152c27f6e231645 (patch)
treefe3e630d0868267fe70234b73d0d95e5b00ff3e9
parent59ce6cc1cb9a6ee3dcde05af58979d2e189870db (diff)
downloadssh2-rs-9efb2d664971682278b37eb40152c27f6e231645.zip
adjust std usage for rust 1.26 compat
-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)
}
}