From 99592b9021b2dbc5134d03782f70d58fe177f33f Mon Sep 17 00:00:00 2001 From: Joel Wurtz Date: Thu, 13 Feb 2025 04:10:29 +0100 Subject: [PATCH] fix(client): fix tests on documentation (#1201) --- client/src/builder.rs | 2 +- client/src/lib.rs | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/client/src/builder.rs b/client/src/builder.rs index 6f8f2c0f..43f88d35 100644 --- a/client/src/builder.rs +++ b/client/src/builder.rs @@ -69,7 +69,7 @@ impl ClientBuilder { /// // trait implement for the logic of middleware. most of the types are boilerplate /// // that can be copy/pasted. the real logic goes into `async fn call` /// impl<'r, 'c> Service> for MyMiddleware { - /// type Response = Response<'c>; + /// type Response = Response; /// type Error = Error; /// /// async fn call(&self, req: ServiceRequest<'r, 'c>) -> Result { diff --git a/client/src/lib.rs b/client/src/lib.rs index e6ae010b..52b7fd5a 100644 --- a/client/src/lib.rs +++ b/client/src/lib.rs @@ -7,7 +7,10 @@ //! #[tokio::main] //! async fn main() -> Result<(), Error> { //! // build client with tls enabled. +//! #[cfg(feature = "rustls")] //! let client = Client::builder().rustls().finish(); +//! #[cfg(not(feature = "rustls"))] +//! let client = Client::builder().finish(); //! // send get request to google and wait for response. //! let res = client.get("https://www.google.com/").send().await?; //! // parse streaming response body to bytes.