Skip to content

Commit

Permalink
fix(client): fix tests on documentation (#1201)
Browse files Browse the repository at this point in the history
  • Loading branch information
joelwurtz authored Feb 13, 2025
1 parent 590ea7d commit 99592b9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion client/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<ServiceRequest<'r, 'c>> for MyMiddleware {
/// type Response = Response<'c>;
/// type Response = Response;
/// type Error = Error;
///
/// async fn call(&self, req: ServiceRequest<'r, 'c>) -> Result<Self::Response, Self::Error> {
Expand Down
3 changes: 3 additions & 0 deletions client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 99592b9

Please sign in to comment.