Rename EmptyRouter to MethodNotAllowed (#411)

It is no longer needed in `Router` so can be changed to always return
`403 Method Not Allowed`.
This commit is contained in:
David Pedersen
2021-10-25 23:28:22 +02:00
committed by GitHub
parent 59819e42bf
commit e43bdf0ecf
6 changed files with 56 additions and 67 deletions
+2
View File
@@ -134,6 +134,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
with a trailing slash is received.
- This can be overridden by explicitly defining two routes: One with and one
without trailing a slash.
- **breaking:** `EmptyRouter` has been renamed to `MethodNotAllowed` as its only
used in method routers and not in path routers (`Router`)
[#339]: https://github.com/tokio-rs/axum/pull/339
[#286]: https://github.com/tokio-rs/axum/pull/286