mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-24 00:00:16 +02:00
Change Router::with_state and impl Service for Router<()> (#1552)
* Implement `Service` for `Router<(), B>` * wip * wip * fix some tests * fix examples * fix doc tests * clean up docs * changelog * fix * also call `with_state` when converting `MethodRouter` into a `MakeService` * suggestions from review
This commit is contained in:
@@ -50,7 +50,7 @@ mod tests {
|
||||
|
||||
#[tokio::test]
|
||||
async fn test_get() {
|
||||
let app = app().into_service();
|
||||
let app = app();
|
||||
|
||||
let response = app
|
||||
.oneshot(Request::get("/get-head").body(Body::empty()).unwrap())
|
||||
@@ -66,7 +66,7 @@ mod tests {
|
||||
|
||||
#[tokio::test]
|
||||
async fn test_implicit_head() {
|
||||
let app = app().into_service();
|
||||
let app = app();
|
||||
|
||||
let response = app
|
||||
.oneshot(Request::head("/get-head").body(Body::empty()).unwrap())
|
||||
|
||||
Reference in New Issue
Block a user