Rename option to “pool_max_idle_per_host” (#917)
reqwest exposes the “pool_max_idle_per_host” option of hyper’s client builder. This option used to be called “max_idle_per_host” in the hyper crate, but it has recently been renamed [1]. This patch renames the reqwest representation of this option to make it consistent with its name in the hyper crate again. [1] https://github.com/hyperium/hyper/pull/2142
This commit is contained in:
@@ -309,8 +309,14 @@ impl ClientBuilder {
|
||||
}
|
||||
|
||||
/// Sets the maximum idle connection per host allowed in the pool.
|
||||
pub fn pool_max_idle_per_host(self, max: usize) -> ClientBuilder {
|
||||
self.with_inner(move |inner| inner.pool_max_idle_per_host(max))
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
#[deprecated(note = "use pool_max_idle_per_host instead")]
|
||||
pub fn max_idle_per_host(self, max: usize) -> ClientBuilder {
|
||||
self.with_inner(move |inner| inner.max_idle_per_host(max))
|
||||
self.pool_max_idle_per_host(max)
|
||||
}
|
||||
|
||||
/// Enable case sensitive headers.
|
||||
|
||||
Reference in New Issue
Block a user