Skip to content

Commit de1ff4c

Browse files
authored
feat: moved connect module to legacy (#49)
Moved the `connect` module to the legacy namespace to make space for new changes. Renamed legacy.rs -> client.rs and also moved to that namespace. Fixes: hyperium/hyper#3414
1 parent e91fba8 commit de1ff4c

File tree

7 files changed

+9
-5
lines changed

7 files changed

+9
-5
lines changed

examples/client.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use std::env;
22

33
use http_body_util::Empty;
44
use hyper::Request;
5-
use hyper_util::client::{connect::HttpConnector, legacy::Client};
5+
use hyper_util::client::legacy::{connect::HttpConnector, Client};
66

77
#[tokio::main(flavor = "current_thread")]
88
async fn main() -> Result<(), Box<dyn std::error::Error>> {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ use hyper::rt::Timer;
1818
use hyper::{body::Body, Method, Request, Response, Uri, Version};
1919
use tracing::{debug, trace, warn};
2020

21+
use super::super::pool::{self, Ver};
2122
#[cfg(feature = "tcp")]
2223
use super::connect::HttpConnector;
2324
use super::connect::{Alpn, Connect, Connected, Connection};
24-
use super::pool::{self, Ver};
2525
use crate::common::{lazy as hyper_lazy, Exec, Lazy, SyncWrapper};
2626

2727
type BoxSendFuture = Pin<Box<dyn Future<Output = ()> + Send>>;

src/client/legacy/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#[cfg(any(feature = "http1", feature = "http2"))]
2+
mod client;
3+
#[cfg(any(feature = "http1", feature = "http2"))]
4+
pub use client::Client;
5+
6+
pub mod connect;

src/client/mod.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
//! HTTP client utilities
22
3-
//mod client;
4-
pub mod connect;
5-
#[cfg(any(feature = "http1", feature = "http2"))]
3+
/// Legacy implementations of `connect` module and `Client`
64
pub mod legacy;
75
#[doc(hidden)]
86
pub mod pool;

0 commit comments

Comments
 (0)