refactor(body): fix unused sync_wrapper when stream feature disabled (#2287)

This commit is contained in:
Sean McArthur
2020-09-21 13:57:58 -07:00
committed by GitHub
parent aea9c52808
commit 523d66a41f
7 changed files with 46 additions and 4 deletions

View File

@@ -11,6 +11,8 @@
//! ## Example
//! A simple example that uses the `Http` struct to talk HTTP over a Tokio TCP stream
//! ```no_run
//! # #[cfg(feature = "runtime")]
//! # mod rt {
//! use http::{Request, Response, StatusCode};
//! use hyper::{server::conn::Http, service::service_fn, Body};
//! use std::{net::SocketAddr, convert::Infallible};
@@ -38,6 +40,7 @@
//! async fn hello(_req: Request<Body>) -> Result<Response<Body>, Infallible> {
//! Ok(Response::new(Body::from("Hello World!")))
//! }
//! # }
//! ```
use std::error::Error as StdError;