mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-29 00:00:18 +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:
@@ -14,7 +14,7 @@ fn main() {
|
||||
auth_token: Default::default(),
|
||||
};
|
||||
|
||||
let _: axum::routing::RouterService = Router::new()
|
||||
let _: axum::Router = Router::new()
|
||||
.route("/", get(handler))
|
||||
.with_state(state);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user