Skip to content

Commit 9ac0dfe

Browse files
authored
docs(client): Include .pool_timer() in the Client builder example (#186)
The example (/doctest) uses a pool idle timeout, which according to the docs doesn't actually do anything without a pool timer. Including a timer makes this example less misleading.
1 parent a891979 commit 9ac0dfe

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/client/legacy/client.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,10 @@ impl Client<(), ()> {
122122
/// # fn run () {
123123
/// use std::time::Duration;
124124
/// use hyper_util::client::legacy::Client;
125-
/// use hyper_util::rt::TokioExecutor;
125+
/// use hyper_util::rt::{TokioExecutor, TokioTimer};
126126
///
127127
/// let client = Client::builder(TokioExecutor::new())
128+
/// .pool_timer(TokioTimer::new())
128129
/// .pool_idle_timeout(Duration::from_secs(30))
129130
/// .http2_only(true)
130131
/// .build_http();

0 commit comments

Comments
 (0)