diff --git a/actix-web/CHANGES.md b/actix-web/CHANGES.md index 9a768a122..757e31eeb 100644 --- a/actix-web/CHANGES.md +++ b/actix-web/CHANGES.md @@ -2,10 +2,18 @@ ## Unreleased - 2023-xx-xx +### Added + - Add `Resource::{get, post, etc...}` methods for more concisely adding routes that don't need additional guards. +### Changed + +- Handler functions can now receive up to 16 extractor parameters. + ## 4.3.1 - 2023-02-26 +### Added + - Add support for custom methods with the `#[route]` macro. [#2969] [#2969]: https://github.com/actix/actix-web/pull/2969 diff --git a/actix-web/src/extract.rs b/actix-web/src/extract.rs index d4f5cc91f..84904a9eb 100644 --- a/actix-web/src/extract.rs +++ b/actix-web/src/extract.rs @@ -416,6 +416,10 @@ mod tuple_from_req { tuple_from_req! { TupleFromRequest10; A, B, C, D, E, F, G, H, I, J } tuple_from_req! { TupleFromRequest11; A, B, C, D, E, F, G, H, I, J, K } tuple_from_req! { TupleFromRequest12; A, B, C, D, E, F, G, H, I, J, K, L } + tuple_from_req! { TupleFromRequest13; A, B, C, D, E, F, G, H, I, J, K, L, M } + tuple_from_req! { TupleFromRequest14; A, B, C, D, E, F, G, H, I, J, K, L, M, N } + tuple_from_req! { TupleFromRequest15; A, B, C, D, E, F, G, H, I, J, K, L, M, N, O } + tuple_from_req! { TupleFromRequest16; A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P } } #[cfg(test)] diff --git a/actix-web/src/handler.rs b/actix-web/src/handler.rs index 522a48b82..0c5e58e28 100644 --- a/actix-web/src/handler.rs +++ b/actix-web/src/handler.rs @@ -151,6 +151,10 @@ factory_tuple! { A B C D E F G H I } factory_tuple! { A B C D E F G H I J } factory_tuple! { A B C D E F G H I J K } factory_tuple! { A B C D E F G H I J K L } +factory_tuple! { A B C D E F G H I J K L M } +factory_tuple! { A B C D E F G H I J K L M N } +factory_tuple! { A B C D E F G H I J K L M N O } +factory_tuple! { A B C D E F G H I J K L M N O P } #[cfg(test)] mod tests { @@ -167,6 +171,7 @@ mod tests { async fn handler_max( _01: (), _02: (), _03: (), _04: (), _05: (), _06: (), _07: (), _08: (), _09: (), _10: (), _11: (), _12: (), + _13: (), _14: (), _15: (), _16: (), ) {} assert_impl_handler(handler_min);