Skip to content

Commit 95bb0d9

Browse files
authored
docs(client): fix client builder argument missing in doc (#20)
1 parent 91d8b0a commit 95bb0d9

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/client/legacy.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,13 @@ impl Client<(), ()> {
101101
/// # Example
102102
///
103103
/// ```
104-
/// # #[cfg(feature = "runtime")]
104+
/// # #[cfg(feature = "runtime")]
105105
/// # fn run () {
106106
/// use std::time::Duration;
107107
/// use hyper::Client;
108+
/// use hyper_util::rt::TokioExecutor;
108109
///
109-
/// let client = Client::builder()
110+
/// let client = Client::builder(TokioExecutor::new())
110111
/// .pool_idle_timeout(Duration::from_secs(30))
111112
/// .http2_only(true)
112113
/// .build_http();
@@ -141,7 +142,7 @@ where
141142
/// # Example
142143
///
143144
/// ```
144-
/// # #[cfg(feature = "runtime")]
145+
/// # #[cfg(feature = "runtime")]
145146
/// # fn run () {
146147
/// use hyper::{Client, Uri};
147148
///
@@ -170,7 +171,7 @@ where
170171
/// # Example
171172
///
172173
/// ```
173-
/// # #[cfg(feature = "runtime")]
174+
/// # #[cfg(feature = "runtime")]
174175
/// # fn run () {
175176
/// use hyper::{Method, Client, Request};
176177
/// use http_body_util::Full;
@@ -894,12 +895,13 @@ fn is_schema_secure(uri: &Uri) -> bool {
894895
/// # Example
895896
///
896897
/// ```
897-
/// # #[cfg(feature = "runtime")]
898+
/// # #[cfg(feature = "runtime")]
898899
/// # fn run () {
899900
/// use std::time::Duration;
900901
/// use hyper::Client;
902+
/// use hyper_util::rt::TokioExecutor;
901903
///
902-
/// let client = Client::builder()
904+
/// let client = Client::builder(TokioExecutor::new())
903905
/// .pool_idle_timeout(Duration::from_secs(30))
904906
/// .http2_only(true)
905907
/// .build_http();

0 commit comments

Comments
 (0)