mirror of
https://github.com/tokio-rs/axum.git
synced 2024-11-25 00:28:07 +01:00
serve also requires hyper/http1
This commit is contained in:
parent
f1c0b118ea
commit
b1e9930eb6
3 changed files with 3 additions and 4 deletions
|
@ -148,7 +148,7 @@ impl BenchmarkBuilder {
|
|||
let addr = listener.local_addr().unwrap();
|
||||
|
||||
std::thread::spawn(move || {
|
||||
rt.block_on(axum::serve(listener, app));
|
||||
rt.block_on(axum::serve(listener, app)).unwrap();
|
||||
});
|
||||
|
||||
let mut cmd = Command::new("rewrk");
|
||||
|
|
|
@ -441,7 +441,7 @@ pub mod handler;
|
|||
pub mod middleware;
|
||||
pub mod response;
|
||||
pub mod routing;
|
||||
#[cfg(feature = "tokio")]
|
||||
#[cfg(all(feature = "tokio", feature = "http1"))]
|
||||
pub mod serve;
|
||||
|
||||
#[cfg(test)]
|
||||
|
@ -477,7 +477,7 @@ pub use axum_core::{BoxError, Error, RequestExt, RequestPartsExt};
|
|||
#[cfg(feature = "macros")]
|
||||
pub use axum_macros::debug_handler;
|
||||
|
||||
#[cfg(feature = "tokio")]
|
||||
#[cfg(all(feature = "tokio", feature = "http1"))]
|
||||
#[doc(inline)]
|
||||
pub use self::serve::serve;
|
||||
|
||||
|
|
|
@ -62,7 +62,6 @@ mod tests {
|
|||
use http_body_util::BodyExt;
|
||||
use serde_json::{json, Value};
|
||||
use std::net::SocketAddr;
|
||||
use tokio::net::TcpListener;
|
||||
use tower::Service; // for `call`
|
||||
use tower::ServiceExt; // for `oneshot` and `ready` // for `collect`
|
||||
|
||||
|
|
Loading…
Reference in a new issue