Skip to content

Commit

Permalink
chore: fix example inside lib
Browse files Browse the repository at this point in the history
  • Loading branch information
kristof-mattei committed Nov 3, 2023
1 parent 35fa237 commit b4b6c24
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<dyn std::error::Error>>{
//! let https = HttpsConnector::new();
//! let client = Client::builder().build::<_, hyper::Body>(https);
//! let client = Client::builder(TokioExecutor::new()).build::<_, Empty<Bytes>>(https);
//!
//! let res = client.get("https://hyper.rs".parse()?).await?;
//! assert_eq!(res.status(), 200);
Expand Down

0 comments on commit b4b6c24

Please sign in to comment.