From 9efb2d664971682278b37eb40152c27f6e231645 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Wed, 24 Jul 2019 14:07:00 -0700 Subject: adjust std usage for rust 1.26 compat --- src/error.rs | 11 ++++++----- 1 file 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 for std::io::Error { - fn from(err: Error) -> std::io::Error { +impl From 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) } } -- cgit v1.2.3