Skip to content

Commit

Permalink
feat: moved connect module to legacy (#49)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
kaffarell authored Nov 16, 2023
1 parent e91fba8 commit de1ff4c
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::env;

use http_body_util::Empty;
use hyper::Request;
use hyper_util::client::{connect::HttpConnector, legacy::Client};
use hyper_util::client::legacy::{connect::HttpConnector, Client};

#[tokio::main(flavor = "current_thread")]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
Expand Down
2 changes: 1 addition & 1 deletion src/client/legacy.rs → src/client/legacy/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ use hyper::rt::Timer;
use hyper::{body::Body, Method, Request, Response, Uri, Version};
use tracing::{debug, trace, warn};

use super::super::pool::{self, Ver};
#[cfg(feature = "tcp")]
use super::connect::HttpConnector;
use super::connect::{Alpn, Connect, Connected, Connection};
use super::pool::{self, Ver};
use crate::common::{lazy as hyper_lazy, Exec, Lazy, SyncWrapper};

type BoxSendFuture = Pin<Box<dyn Future<Output = ()> + Send>>;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 6 additions & 0 deletions src/client/legacy/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#[cfg(any(feature = "http1", feature = "http2"))]
mod client;
#[cfg(any(feature = "http1", feature = "http2"))]
pub use client::Client;

pub mod connect;
4 changes: 1 addition & 3 deletions src/client/mod.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
//! HTTP client utilities

//mod client;
pub mod connect;
#[cfg(any(feature = "http1", feature = "http2"))]
/// Legacy implementations of `connect` module and `Client`
pub mod legacy;
#[doc(hidden)]
pub mod pool;

0 comments on commit de1ff4c

Please sign in to comment.