-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Overlapping routes with differing methods cause a panic #1498
Comments
This is a known limitation, if you have multiple |
Also, another variant: use axum::{
routing::{get, post},
Router,
};
fn main() {
/* these are configurable */
let base_path = "/";
let get_base_path = "/";
let post_base_path = "/";
let get_route = Router::new().nest(
get_base_path,
Router::new().route("/get", get(|| std::future::ready("Ho".to_owned()))),
);
let post_route = Router::new().nest(
post_base_path,
Router::new().route("/post", post(|| std::future::ready("Ho".to_owned()))),
);
let app: Router<String> =
Router::new().nest(base_path, Router::new().merge(get_route).merge(post_route));
} cause this error:
|
@BratSinot Please open a new issue 😊 |
Bug Report
Version
axum 0.6.0-rc.2
Platform
Linux manjaro 5.15.74-3-MANJARO x86_64 GNU/Linux
Crates
Description
The text was updated successfully, but these errors were encountered: