Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: replace SyncWrapper with sync_wrapper crate #118

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ tracing = { version = "0.1", default-features = false, features = ["std"], optio
tokio = { version = "1", optional = true, default-features = false }
tower-service ={ version = "0.3", optional = true }
tower = { version = "0.4.1", optional = true, default-features = false, features = ["make", "util"] }
sync_wrapper = { version = "1", optional = true }

[dev-dependencies]
hyper = { version = "1.2.0", features = ["full"] }
Expand Down Expand Up @@ -57,7 +58,7 @@ full = [
]

client = ["hyper/client", "dep:tracing", "dep:futures-channel", "dep:tower", "dep:tower-service"]
client-legacy = ["client", "dep:socket2", "tokio/sync"]
client-legacy = ["client", "dep:socket2", "dep:sync_wrapper", "tokio/sync"]

server = ["hyper/server"]
server-auto = ["server", "http1", "http2"]
Expand Down
3 changes: 2 additions & 1 deletion src/client/legacy/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ use http::uri::Scheme;
use hyper::header::{HeaderValue, HOST};
use hyper::rt::Timer;
use hyper::{body::Body, Method, Request, Response, Uri, Version};
use sync_wrapper::SyncWrapper;
use tracing::{debug, trace, warn};

use super::connect::capture::CaptureConnectionExtension;
Expand All @@ -24,7 +25,7 @@ use super::connect::HttpConnector;
use super::connect::{Alpn, Connect, Connected, Connection};
use super::pool::{self, Ver};

use crate::common::{lazy as hyper_lazy, timer, Exec, Lazy, SyncWrapper};
use crate::common::{lazy as hyper_lazy, timer, Exec, Lazy};

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

Expand Down
4 changes: 0 additions & 4 deletions src/common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,10 @@ pub(crate) mod exec;
#[cfg(feature = "client")]
mod lazy;
pub(crate) mod rewind;
#[cfg(feature = "client")]
mod sync;
pub(crate) mod timer;

#[cfg(feature = "client")]
pub(crate) use exec::Exec;

#[cfg(feature = "client")]
pub(crate) use lazy::{lazy, Started as Lazy};
#[cfg(feature = "client")]
pub(crate) use sync::SyncWrapper;
67 changes: 0 additions & 67 deletions src/common/sync.rs

This file was deleted.