refactor(lib): fix many lint warnings
This commit is contained in:
		| @@ -8,7 +8,6 @@ | ||||
| //! If don't have need to manage connections yourself, consider using the | ||||
| //! higher-level [Client](super) API. | ||||
| use std::fmt; | ||||
| use std::marker::PhantomData; | ||||
| use std::mem; | ||||
| use std::sync::Arc; | ||||
|  | ||||
|   | ||||
| @@ -14,10 +14,8 @@ use std::net::{ | ||||
|     SocketAddrV4, SocketAddrV6, | ||||
| }; | ||||
| use std::str::FromStr; | ||||
| use std::sync::Arc; | ||||
|  | ||||
| use futures_util::{FutureExt, StreamExt}; | ||||
| use tokio_executor::TypedExecutor; | ||||
| use tokio_sync::{mpsc, oneshot}; | ||||
|  | ||||
| use crate::common::{Future, Never, Pin, Poll, Unpin, task}; | ||||
| @@ -330,7 +328,7 @@ impl Resolve for TokioThreadpoolGaiResolver { | ||||
| impl Future for TokioThreadpoolGaiFuture { | ||||
|     type Output = Result<GaiAddrs, io::Error>; | ||||
|  | ||||
|     fn poll(mut self: Pin<&mut Self>, cx: &mut task::Context<'_>) -> Poll<Self::Output> { | ||||
|     fn poll(self: Pin<&mut Self>, _cx: &mut task::Context<'_>) -> Poll<Self::Output> { | ||||
|         match ready!(tokio_executor::threadpool::blocking(|| (self.name.as_str(), 0).to_socket_addrs())) { | ||||
|             Ok(Ok(iter)) => Poll::Ready(Ok(GaiAddrs { inner: IpAddrs { iter } })), | ||||
|             Ok(Err(e)) => Poll::Ready(Err(e)), | ||||
|   | ||||
| @@ -2,7 +2,7 @@ use futures_core::Stream; | ||||
| use futures_channel::{mpsc, oneshot}; | ||||
| use futures_util::future; | ||||
|  | ||||
| use crate::common::{Future, Never, Pin, Poll, task}; | ||||
| use crate::common::{Future, Pin, Poll, task}; | ||||
|  | ||||
| pub type RetryPromise<T, U> = oneshot::Receiver<Result<U, (crate::Error, Option<T>)>>; | ||||
| pub type Promise<T> = oneshot::Receiver<Result<T, crate::Error>>; | ||||
| @@ -136,9 +136,6 @@ pub struct Receiver<T, U> { | ||||
|     taker: want::Taker, | ||||
| } | ||||
|  | ||||
| //impl<T, U> Stream for Receiver<T, U> { | ||||
| //    type Item = (T, Callback<T, U>); | ||||
|  | ||||
| impl<T, U> Receiver<T, U> { | ||||
|     pub(crate) fn poll_next(&mut self, cx: &mut task::Context<'_>) -> Poll<Option<(T, Callback<T, U>)>> { | ||||
|         match Pin::new(&mut self.inner).poll_next(cx) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user