Skip to content

Update async-std and fix h1_client #114

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -42,7 +42,7 @@ cfg-if = "1.0.0"

# h1_client
async-h1 = { version = "2.0.0", optional = true }
async-std = { version = "1.6.0", default-features = false, optional = true }
async-std = { version = "1.13.0", default-features = false, optional = true }
async-native-tls = { version = "0.3.1", optional = true }
dashmap = { version = "5.3.4", optional = true }
deadpool = { version = "0.7.0", optional = true }
6 changes: 3 additions & 3 deletions src/h1/mod.rs
Original file line number Diff line number Diff line change
@@ -104,7 +104,7 @@ impl H1Client {
note = "This function is misnamed. Prefer `Config::max_connections_per_host` instead."
)]
pub fn with_max_connections(max: usize) -> Self {
#[cfg(features = "h1_client")]
#[cfg(feature = "h1_client")]
assert!(max > 0, "max_connections_per_host with h1_client must be greater than zero or it will deadlock!");

let config = Config {
@@ -269,7 +269,7 @@ impl HttpClient for H1Client {
///
/// Config options may not impact existing connections.
fn set_config(&mut self, config: Config) -> http_types::Result<()> {
#[cfg(features = "h1_client")]
#[cfg(feature = "h1_client")]
assert!(config.max_connections_per_host > 0, "max_connections_per_host with h1_client must be greater than zero or it will deadlock!");

self.config = Arc::new(config);
@@ -287,7 +287,7 @@ impl TryFrom<Config> for H1Client {
type Error = Infallible;

fn try_from(config: Config) -> Result<Self, Self::Error> {
#[cfg(features = "h1_client")]
#[cfg(feature = "h1_client")]
assert!(config.max_connections_per_host > 0, "max_connections_per_host with h1_client must be greater than zero or it will deadlock!");

Ok(Self {