Skip to content

Commit 689dc29

Browse files
authored
chore(lib): remove redundant import (#314)
1 parent 551e7bb commit 689dc29

19 files changed

Lines changed: 3 additions & 28 deletions

File tree

src/client/legacy/client.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
77
use std::error::Error as StdError;
88
use std::fmt;
9-
use std::future::{Future, poll_fn};
9+
use std::future::poll_fn;
1010
use std::pin::Pin;
1111
use std::task::{self, Poll};
1212
use std::time::Duration;

src/client/legacy/connect/dns.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
//! });
2222
//! ```
2323
use std::error::Error;
24-
use std::future::Future;
2524
use std::net::{Ipv4Addr, Ipv6Addr, SocketAddr, SocketAddrV4, SocketAddrV6, ToSocketAddrs};
2625
use std::pin::Pin;
2726
use std::str::FromStr;
@@ -251,7 +250,6 @@ impl Iterator for SocketAddrs {
251250
}
252251

253252
mod sealed {
254-
use std::future::Future;
255253
use std::task::{self, Poll};
256254

257255
use super::{Name, SocketAddr};
@@ -298,7 +296,6 @@ where
298296
#[cfg(test)]
299297
mod tests {
300298
use super::*;
301-
use std::net::{Ipv4Addr, Ipv6Addr};
302299

303300
#[test]
304301
fn test_ip_addrs_split_by_preference() {

src/client/legacy/connect/http.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
use std::error::Error as StdError;
22
use std::fmt;
3-
use std::future::Future;
43
use std::io;
54
use std::marker::PhantomData;
65
use std::net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr};

src/client/legacy/connect/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
//! Or, fully written out:
2727
//!
2828
//! ```
29-
//! use std::{future::Future, net::SocketAddr, pin::Pin, task::{self, Poll}};
29+
//! use std::{net::SocketAddr, pin::Pin, task::{self, Poll}};
3030
//! use http::Uri;
3131
//! use tokio::net::TcpStream;
3232
//! use tower_service::Service;
@@ -302,7 +302,6 @@ where
302302

303303
pub(super) mod sealed {
304304
use std::error::Error as StdError;
305-
use std::future::Future;
306305

307306
use ::http::Uri;
308307
use hyper::rt::{Read, Write};

src/client/legacy/connect/proxy/socks/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ mod v4;
55
pub use v4::{SocksV4, SocksV4Error};
66

77
use pin_project_lite::pin_project;
8-
use std::future::Future;
98
use std::pin::Pin;
109
use std::task::{Context, Poll};
1110

src/client/legacy/connect/proxy/tunnel.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
use std::error::Error as StdError;
2-
use std::future::Future;
3-
use std::marker::{PhantomData, Unpin};
2+
use std::marker::PhantomData;
43
use std::pin::Pin;
54
use std::task::{self, Poll, ready};
65

src/client/legacy/pool.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ use std::collections::{HashMap, HashSet, VecDeque};
44
use std::convert::Infallible;
55
use std::error::Error as StdError;
66
use std::fmt::{self, Debug};
7-
use std::future::Future;
87
use std::hash::Hash;
98
use std::ops::{Deref, DerefMut};
109
use std::pin::Pin;
@@ -841,7 +840,6 @@ impl<T> WeakOpt<T> {
841840
#[cfg(test)]
842841
mod tests {
843842
use std::fmt::Debug;
844-
use std::future::Future;
845843
use std::hash::Hash;
846844
use std::pin::Pin;
847845
use std::task::{self, Poll};

src/client/pool/cache.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ pub use self::internal::Cached;
2020
mod internal {
2121
use std::collections::VecDeque;
2222
use std::fmt;
23-
use std::future::Future;
2423
use std::pin::Pin;
2524
use std::sync::{Arc, Mutex, Weak};
2625
use std::task::{self, Poll, Waker, ready};
@@ -631,7 +630,6 @@ mod tests {
631630
// (FIFO), so a waiter cannot be starved by later arrivals.
632631
#[tokio::test]
633632
async fn test_waiters_woken_in_fifo_order() {
634-
use std::future::Future;
635633
use std::task::{Context, Poll, Waker};
636634

637635
let (mock, mut handle) = tower_test::mock::pair::<u32, &'static str>();
@@ -697,7 +695,6 @@ mod tests {
697695

698696
#[tokio::test]
699697
async fn dropped_racing_future_cancels_waiter() {
700-
use std::future::Future;
701698
use std::task::{Context, Poll, Waker};
702699

703700
let (mock, mut handle) = tower_test::mock::pair::<u32, &'static str>();
@@ -825,7 +822,6 @@ mod tests {
825822

826823
#[tokio::test]
827824
async fn idle_return_wakes_pending_poll_ready() {
828-
use std::future::Future;
829825
use std::sync::atomic::AtomicBool;
830826
use std::task::{Context, Waker};
831827

src/client/pool/negotiate.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ pub use self::internal::Negotiate;
4646
pub use self::internal::Negotiated;
4747

4848
mod internal {
49-
use std::future::Future;
5049
use std::pin::Pin;
5150
use std::sync::{Arc, Mutex};
5251
use std::task::{self, Poll, ready};

src/client/pool/singleton.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,6 @@ where
159159
/// local to the future that was dropped.
160160
mod internal {
161161
use std::fmt;
162-
use std::future::Future;
163162
use std::pin::Pin;
164163
use std::sync::{Arc, Mutex, Weak};
165164
use std::task::{self, Poll, Waker};
@@ -507,7 +506,6 @@ mod internal {
507506
#[cfg(test)]
508507
mod tests {
509508
use std::error::Error;
510-
use std::future::Future;
511509
use std::pin::Pin;
512510
use std::task::Poll;
513511

0 commit comments

Comments
 (0)