Skip to content

Commit

Permalink
align nest and merge a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
davidpdrsn committed Mar 3, 2023
1 parent f4f1156 commit 1ab484a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions axum/src/routing/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,11 @@ where
fallback,
} = router;

for (route_id, endpoint) in routes {
let inner_path = &*node.route_id_to_path[&route_id];
for (id, endpoint) in routes {
let inner_path = node
.route_id_to_path
.get(&id)
.expect("no path for route id. This is a bug in axum. Please file an issue");

let path = path_for_nested_route(prefix, inner_path);

Expand Down

0 comments on commit 1ab484a

Please sign in to comment.