Skip to content

Commit

Permalink
Fixed docs for chained method routing
Browse files Browse the repository at this point in the history
  • Loading branch information
fmeringdal committed Sep 6, 2022
1 parent b5d4bf2 commit 50c59c7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions axum/src/routing/method_routing.rs
Expand Up @@ -178,8 +178,8 @@ macro_rules! chained_service_fn {
/// Ok::<_, Infallible>(Response::new(Body::empty()))
/// });
///
/// // Requests to `GET /` will go to `service` and `POST /` will go to
/// // `other_service`.
/// // Requests to `GET /` will go to `other_service` and `POST /` will go to
/// // `service`.
/// let app = Router::new().route("/", post_service(service).get_service(other_service));
/// # async {
/// # axum::Server::bind(&"".parse().unwrap()).serve(app.into_make_service()).await.unwrap();
Expand Down Expand Up @@ -242,8 +242,8 @@ macro_rules! chained_handler_fn {
///
/// async fn other_handler() {}
///
/// // Requests to `GET /` will go to `handler` and `POST /` will go to
/// // `other_handler`.
/// // Requests to `GET /` will go to `other_handler` and `POST /` will go to
/// // `handler`.
/// let app = Router::new().route("/", post(handler).get(other_handler));
/// # async {
/// # axum::Server::bind(&"".parse().unwrap()).serve(app.into_make_service()).await.unwrap();
Expand Down

0 comments on commit 50c59c7

Please sign in to comment.