style: fix clippy::io_other_error (#1078)
This commit is contained in:
@@ -9,7 +9,7 @@ use std::{
|
|||||||
#[cfg(feature = "async-std1")]
|
#[cfg(feature = "async-std1")]
|
||||||
use async_std::net::{TcpStream as AsyncStd1TcpStream, ToSocketAddrs as AsyncStd1ToSocketAddrs};
|
use async_std::net::{TcpStream as AsyncStd1TcpStream, ToSocketAddrs as AsyncStd1ToSocketAddrs};
|
||||||
use futures_io::{
|
use futures_io::{
|
||||||
AsyncRead as FuturesAsyncRead, AsyncWrite as FuturesAsyncWrite, Error as IoError, ErrorKind,
|
AsyncRead as FuturesAsyncRead, AsyncWrite as FuturesAsyncWrite, Error as IoError,
|
||||||
Result as IoResult,
|
Result as IoResult,
|
||||||
};
|
};
|
||||||
#[cfg(feature = "async-std1-rustls")]
|
#[cfg(feature = "async-std1-rustls")]
|
||||||
@@ -122,8 +122,7 @@ impl AsyncNetworkStream {
|
|||||||
InnerAsyncNetworkStream::AsyncStd1RustlsTls(s) => s.get_ref().0.peer_addr(),
|
InnerAsyncNetworkStream::AsyncStd1RustlsTls(s) => s.get_ref().0.peer_addr(),
|
||||||
InnerAsyncNetworkStream::None => {
|
InnerAsyncNetworkStream::None => {
|
||||||
debug_assert!(false, "InnerAsyncNetworkStream::None must never be built");
|
debug_assert!(false, "InnerAsyncNetworkStream::None must never be built");
|
||||||
Err(IoError::new(
|
Err(IoError::other(
|
||||||
ErrorKind::Other,
|
|
||||||
"InnerAsyncNetworkStream::None must never be built",
|
"InnerAsyncNetworkStream::None must never be built",
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user