style(lib): use just std instead of ::std in paths (#2101)
				
					
				
			This commit is contained in:
		| @@ -692,7 +692,7 @@ mod tests { | ||||
|         let local_timeout = Duration::default(); | ||||
|         let unreachable_v4_timeout = measure_connect(unreachable_ipv4_addr()).1; | ||||
|         let unreachable_v6_timeout = measure_connect(unreachable_ipv6_addr()).1; | ||||
|         let fallback_timeout = ::std::cmp::max(unreachable_v4_timeout, unreachable_v6_timeout) | ||||
|         let fallback_timeout = std::cmp::max(unreachable_v4_timeout, unreachable_v6_timeout) | ||||
|             + Duration::from_millis(250); | ||||
|  | ||||
|         let scenarios = &[ | ||||
| @@ -849,7 +849,7 @@ mod tests { | ||||
|         fn measure_connect(addr: IpAddr) -> (bool, Duration) { | ||||
|             let start = Instant::now(); | ||||
|             let result = | ||||
|                 ::std::net::TcpStream::connect_timeout(&(addr, 80).into(), Duration::from_secs(1)); | ||||
|                 std::net::TcpStream::connect_timeout(&(addr, 80).into(), Duration::from_secs(1)); | ||||
|  | ||||
|             let reachable = result.is_ok() || result.unwrap_err().kind() == io::ErrorKind::TimedOut; | ||||
|             let duration = start.elapsed(); | ||||
|   | ||||
| @@ -171,7 +171,7 @@ impl<T: Poolable> Pool<T> { | ||||
|     } | ||||
|  | ||||
|     #[cfg(test)] | ||||
|     fn locked(&self) -> ::std::sync::MutexGuard<'_, PoolInner<T>> { | ||||
|     fn locked(&self) -> std::sync::MutexGuard<'_, PoolInner<T>> { | ||||
|         self.inner.as_ref().expect("enabled").lock().expect("lock") | ||||
|     } | ||||
|  | ||||
| @@ -902,7 +902,7 @@ mod tests { | ||||
|             super::Config { | ||||
|                 enabled: true, | ||||
|                 keep_alive_timeout: Some(Duration::from_millis(10)), | ||||
|                 max_idle_per_host: ::std::usize::MAX, | ||||
|                 max_idle_per_host: std::usize::MAX, | ||||
|             }, | ||||
|             &Exec::Default, | ||||
|         ); | ||||
|   | ||||
| @@ -51,7 +51,7 @@ fn retryable_request() { | ||||
|             try_ready!(sock1.read(&mut [0u8; 512])); | ||||
|             try_ready!(sock1.write(b"HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n")); | ||||
|             Ok(Async::Ready(())) | ||||
|         }).map_err(|e: ::std::io::Error| panic!("srv1 poll_fn error: {}", e)); | ||||
|         }).map_err(|e: std::io::Error| panic!("srv1 poll_fn error: {}", e)); | ||||
|         rt.block_on(res1.join(srv1)).expect("res1"); | ||||
|     } | ||||
|     drop(sock1); | ||||
| @@ -68,7 +68,7 @@ fn retryable_request() { | ||||
|         try_ready!(sock2.read(&mut [0u8; 512])); | ||||
|         try_ready!(sock2.write(b"HTTP/1.1 222 OK\r\nContent-Length: 0\r\n\r\n")); | ||||
|         Ok(Async::Ready(())) | ||||
|     }).map_err(|e: ::std::io::Error| panic!("srv2 poll_fn error: {}", e)); | ||||
|     }).map_err(|e: std::io::Error| panic!("srv2 poll_fn error: {}", e)); | ||||
|  | ||||
|     rt.block_on(res2.join(srv2)).expect("res2"); | ||||
| } | ||||
| @@ -97,7 +97,7 @@ fn conn_reset_after_write() { | ||||
|             try_ready!(sock1.read(&mut [0u8; 512])); | ||||
|             try_ready!(sock1.write(b"HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n")); | ||||
|             Ok(Async::Ready(())) | ||||
|         }).map_err(|e: ::std::io::Error| panic!("srv1 poll_fn error: {}", e)); | ||||
|         }).map_err(|e: std::io::Error| panic!("srv1 poll_fn error: {}", e)); | ||||
|         rt.block_on(res1.join(srv1)).expect("res1"); | ||||
|     } | ||||
|  | ||||
| @@ -117,7 +117,7 @@ fn conn_reset_after_write() { | ||||
|         try_ready!(sock1.as_mut().unwrap().read(&mut [0u8; 512])); | ||||
|         sock1.take(); | ||||
|         Ok(Async::Ready(())) | ||||
|     }).map_err(|e: ::std::io::Error| panic!("srv2 poll_fn error: {}", e)); | ||||
|     }).map_err(|e: std::io::Error| panic!("srv2 poll_fn error: {}", e)); | ||||
|     let err = rt.block_on(res2.join(srv2)).expect_err("res2"); | ||||
|     assert!(err.is_incomplete_message(), "{:?}", err); | ||||
| } | ||||
| @@ -159,7 +159,7 @@ fn checkout_win_allows_connect_future_to_be_pooled() { | ||||
|                 0\r\n\r\n\ | ||||
|             ")); | ||||
|             Ok(Async::Ready(())) | ||||
|         }).map_err(|e: ::std::io::Error| panic!("srv1 poll_fn error: {}", e)); | ||||
|         }).map_err(|e: std::io::Error| panic!("srv1 poll_fn error: {}", e)); | ||||
|  | ||||
|         rt.block_on(res1.join(srv1)).expect("res1").0 | ||||
|     }; | ||||
| @@ -177,7 +177,7 @@ fn checkout_win_allows_connect_future_to_be_pooled() { | ||||
|             try_ready!(sock1.read(&mut [0u8; 512])); | ||||
|             try_ready!(sock1.write(b"HTTP/1.1 200 OK\r\nConnection: close\r\n\r\nx")); | ||||
|             Ok(Async::Ready(())) | ||||
|         }).map_err(|e: ::std::io::Error| panic!("srv2 poll_fn error: {}", e)); | ||||
|         }).map_err(|e: std::io::Error| panic!("srv2 poll_fn error: {}", e)); | ||||
|  | ||||
|         rt.block_on(res2.join(drain).join(srv2)).expect("res2"); | ||||
|     } | ||||
| @@ -214,7 +214,7 @@ fn checkout_win_allows_connect_future_to_be_pooled() { | ||||
|             try_ready!(sock2.read(&mut [0u8; 512])); | ||||
|             try_ready!(sock2.write(b"HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n")); | ||||
|             Ok(Async::Ready(())) | ||||
|         }).map_err(|e: ::std::io::Error| panic!("srv3 poll_fn error: {}", e)); | ||||
|         }).map_err(|e: std::io::Error| panic!("srv3 poll_fn error: {}", e)); | ||||
|  | ||||
|         rt.block_on(res3.join(srv3)).expect("res3"); | ||||
|     } | ||||
| @@ -247,7 +247,7 @@ fn bench_http1_get_0b(b: &mut test::Bencher) { | ||||
|             try_ready!(sock1.read(&mut [0u8; 512])); | ||||
|             try_ready!(sock1.write(b"HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n")); | ||||
|             Ok(Async::Ready(())) | ||||
|         }).map_err(|e: ::std::io::Error| panic!("srv1 poll_fn error: {}", e)); | ||||
|         }).map_err(|e: std::io::Error| panic!("srv1 poll_fn error: {}", e)); | ||||
|         rt.block_on(res1.join(srv1)).expect("res1"); | ||||
|     }); | ||||
| } | ||||
| @@ -279,7 +279,7 @@ fn bench_http1_get_10b(b: &mut test::Bencher) { | ||||
|             try_ready!(sock1.read(&mut [0u8; 512])); | ||||
|             try_ready!(sock1.write(b"HTTP/1.1 200 OK\r\nContent-Length: 10\r\n\r\n0123456789")); | ||||
|             Ok(Async::Ready(())) | ||||
|         }).map_err(|e: ::std::io::Error| panic!("srv1 poll_fn error: {}", e)); | ||||
|         }).map_err(|e: std::io::Error| panic!("srv1 poll_fn error: {}", e)); | ||||
|         rt.block_on(res1.join(srv1)).expect("res1"); | ||||
|     }); | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user