From b4b6c24a287b7acfb85321ebc44be22ece6fb6db Mon Sep 17 00:00:00 2001 From: Kristof Mattei <864376+Kristof-Mattei@users.noreply.github.com> Date: Fri, 3 Nov 2023 07:49:37 -0700 Subject: [PATCH] chore: fix example inside lib --- src/lib.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 2245ee3..c832c1c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -7,13 +7,15 @@ //! ## Example //! //! ```no_run +//! use bytes::Bytes; +//! use http_body_util::Empty; //! use hyper_tls::HttpsConnector; -//! use hyper::Client; +//! use hyper_util::{client::legacy::Client, rt::TokioExecutor}; //! //! #[tokio::main(flavor = "current_thread")] //! async fn main() -> Result<(), Box>{ //! let https = HttpsConnector::new(); -//! let client = Client::builder().build::<_, hyper::Body>(https); +//! let client = Client::builder(TokioExecutor::new()).build::<_, Empty>(https); //! //! let res = client.get("https://hyper.rs".parse()?).await?; //! assert_eq!(res.status(), 200);