Commit Graph
57 Commits
Author SHA1 Message Date
dc480f7b0e Re-integrate examples into the root workspace (#1466)
Co-authored-by: David Pedersen <[email protected]>
2023-03-10 12:02:11 +01:00
a26ddd1063 Improve debug_handler message for generic request-consuming extractors (#1826)
Co-authored-by: David Pedersen <[email protected]>
2023-03-10 08:51:03 +00:00
43883b8d9b Replace weird doc paragraph by compiler-checked must_use attribute (#1801)
Co-authored-by: David Pedersen <[email protected]>
2023-03-03 08:54:38 +00:00
Jonas PlatteandGitHub 2c9d2dea0e Upgrade dependencies (#1746) 2023-02-11 23:36:40 +00:00
Jonas Platte 19596584da Update trybuild output 2023-01-30 21:47:57 +01:00
Jonas Platte bdfaedb344 Use call-site span for future Send check in debug_handler 2023-01-30 21:47:57 +01:00
Jonas PlatteandGitHub 7ecf8bd6cf Use implicit format-args captures where applicable (#1709) 2023-01-20 12:04:49 +01:00
Jonas PlatteandGitHub cad6611bf7 Update deny.toml bans (#1668) 2023-01-03 19:53:17 +01:00
Jonas Platte 1ff5ab5ba2 Add emoji for contact links (new issue page) 2022-12-09 11:00:00 +01:00
Jonas PlatteandGitHub 15b6f8cc70 Add "I have looked for existing issues" checkbox to issue templates (#1632) 2022-12-09 09:30:25 +00:00
Jonas PlatteandGitHub b372244099 Guide people to the right places to ask questions (#1631)
* README: Link to discussions instead of issues in Getting Help section

* Link to Discussions and Discord on new issue page
2022-12-09 10:14:31 +01:00
Jonas PlatteandGitHub 8d2fb3618e Remove unused imports from doctest (#1551) 2022-11-20 01:41:50 +01:00
Jonas PlatteandGitHub ce8ea56f3b Small improvements to RouterService (#1548)
* Fix docstrings on RouterService methods

* Simplify signatures of RouterService methods with Self type
2022-11-19 22:26:12 +01:00
Jonas PlatteandGitHub c3fa0b2a3e Fix unused variable warning when developing using a nightly toolchain (#1520) 2022-11-10 12:41:16 +01:00
Jonas Platte 944f388ae0 Add missing cfg's for signed cookie tests 2022-11-05 11:33:27 +01:00
Jonas Platte 36f24990c8 Fix clippy lints 2022-11-05 11:33:27 +01:00
Jonas Platte 21475f94ff Adjust renamed clippy lint name 2022-11-05 11:33:27 +01:00
Jonas PlatteandGitHub beb5ebbe8a Update deny.toml (#1488) 2022-10-20 16:51:52 +02:00
Jonas PlatteandGitHub b378fb283f Add Error::into_inner (#1476) 2022-10-13 11:44:54 +02:00
Jonas PlatteandGitHub a2ab338e68 Rewrite how state is passed from Router to MethodRouter 2022-10-09 19:33:40 +00:00
Jonas PlatteandGitHub 7cbacd1433 Improve the error message for state type inference failure in FromRequest(Parts) derive macro (#1432)
* Add a dedicated error message for state type inference issues

* Generate valid code even if state type can't be inferred

* Also error on state type inference for debug_handler
2022-10-09 20:25:05 +02:00
Jonas PlatteandGitHub a7d8954178 Use RequestPartsExt more in docs / examples (#1445)
* Use RequestPartsExt more in docs / examples

* Remove unused import
2022-10-04 17:26:51 +00:00
b94248191e Add RequestExt::{with_limited_body, into_limited_body} (#1420)
* Move RequestExt and RequestPartsExt into axum-core

* Add RequestExt::into_limited_body

… and use it for Bytes extraction.

* Add RequestExt::with_limited_body

… and use it for Multipart extraction.

Co-authored-by: David Pedersen <[email protected]>
2022-09-28 20:20:47 +00:00
Jonas PlatteandGitHub 410fd49aa9 Fix Cached<T> as the last argument of a handler function (#1428)
* Remove FromRequest impl for Cached<T>

* Add a test for Cached<T> as the last argument of a handler function
2022-09-28 09:06:15 +00:00
Jonas PlatteandGitHub 9196c09fe8 Merge handler::{WithState, IntoService} into one HandlerService type (#1418) 2022-09-26 14:51:42 +02:00
Jonas PlatteandGitHub 83ba8c3876 Remove *_boxed_response_body methods on MethodRouter (#1415)
They were identical to the methods without the prefix.
2022-09-25 16:26:18 +02:00
Jonas PlatteandGitHub 4847d681b1 Allow Routers to inherit state (#1368)
* Rename Fallback::Custom to Fallback::Service

* Allow Routers to inherit state

* Rename Router::{nest => nest_service} and add new nest method for Routers

* Fix lints

* Add basic tests for state inheritance

* Changelog
2022-09-25 11:56:23 +00:00
Jonas PlatteandGitHub e3a17c1249 Add #[track_caller] attribute to Router::into_[make_]service (#1407) 2022-09-23 21:10:08 +02:00
Jonas PlatteandGitHub 4c846488c2 Update expected stderr of trybuild test (#1402) 2022-09-22 18:36:31 +02:00
Jonas PlatteandGitHub 69d64cecc3 Split RouterService off of Router (#1381) 2022-09-22 12:10:55 +02:00
Jonas PlatteandGitHub 18e3fac5d3 Small routing module refactoring (#1364) 2022-09-22 12:10:32 +02:00
Jonas PlatteandGitHub 7105805ba2 Extend from_fn_with_state doctest (#1393) 2022-09-19 21:02:43 +02:00
Jonas PlatteandGitHub 4ade706ab0 Add track_caller to route_with_tsr (#1390)
… and route_service_with_tsr.
2022-09-18 23:12:08 +02:00
Jonas PlatteandGitHub c09ecefcab Use regular non-exhaustive debug representation instead of custom one (#1380) 2022-09-16 22:56:25 +02:00
Jonas PlatteandGitHub c8dbe5a7e9 Relax Multipart FromRequest implementation bounds (#1379) 2022-09-16 18:49:42 +00:00
Jonas PlatteandGitHub da4ea4d4c2 Add must_use attribute to Redirect type (#1356) 2022-09-07 13:52:58 +02:00
Jonas PlatteandGitHub 92f6b68390 Panic when attempting to add a route_layer to an empty router (#1327) 2022-08-25 15:42:17 +02:00
7705ef6661 Add #[derive(FromRequestParts)] (#1305)
* Add missing leading double colon

* Separate handling of last element in FromRequest derive

* FromRequestParts derive

* fix it and add lots of tests

* docs

* changelog

* Update axum-macros/src/lib.rs

Co-authored-by: Jonas Platte <[email protected]>

Co-authored-by: David Pedersen <[email protected]>
2022-08-23 19:14:02 +00:00
Jonas PlatteandGitHub 7795e649f6 Avoid unhelpful compiler suggestion (#1251) 2022-08-12 10:06:38 +00:00
Jonas PlatteandGitHub 7cbb7cf135 Use new Cargo features to avoid implicit features for optional dependencies (#1239)
* Fix changelog entry for MSRV change in axum-extra 0.3.5

* Bump MSRV to 1.60 for axum, axum-extra, axum-macros

* Use new Cargo features to avoid implicit features for optional dependencies
2022-08-09 18:43:02 +02:00
Jonas PlatteandGitHub f0f60681ef Fix intra-doc links on docs.rs (#1205)
* Use version 2 of Cargo's feature resolver

* Increase minimum version of tungstenite

Tungstenite 0.17.1 has a higher MSRV, and there should be no reason to
use it over 0.17.2.

* Clean up and fix MSRV CI job

* Fix some intra-doc links not resolving correctly on docs.rs

* Bump minimum version of tower

… to avoid dependencies with a broken minimum-versions chain.
2022-07-28 19:14:31 +02:00
Jonas PlatteandGitHub 141198ce19 Declare MSRV in Cargo manifests, not .clippy.toml (#1206) 2022-07-28 15:31:47 +02:00
Jonas PlatteandGitHub e6fb53fd68 Fix a typo in axum_extra::extract::Query docs (#1201) 2022-07-27 16:32:21 +02:00
Jonas PlatteandGitHub a3cf025d54 Serialize Json<T> to Bytes instead of Vec<u8> in IntoResponse (#1178) 2022-07-20 16:32:08 +00:00
Jonas PlatteandGitHub 8c31bee9bc docsrs cfg fixes (#1137)
* Remove unused attribute in axum-core

* Fix docs.rs package metadata for axum-extra
2022-07-01 13:35:52 +02:00
Jonas PlatteandGitHub 1812c4dfe8 Remove explicit TryFrom, TryInto imports (#1099) 2022-06-17 18:36:49 +00:00
1d7878c3c8 axum-extra: 0.3.3 (#1042)
* axum-extra: 0.3.3

* Update axum-extra/CHANGELOG.md

* Update axum-extra/CHANGELOG.md

* depend on axum-macros 0.2.2

Co-authored-by: David Pedersen <[email protected]>
2022-05-18 20:29:49 +02:00
Jonas PlatteandGitHub 80d0cc19e6 axum-macros: 0.2.2 (#1044) 2022-05-18 20:23:56 +02:00
Jonas PlatteandGitHub b215a87a19 Add axum_extra::extract::Query 2022-05-17 20:19:24 +02:00
Jonas PlatteandGitHub 591434778f Slightly simplify CORS example (#1027) 2022-05-12 11:36:57 +02:00
Jonas PlatteandGitHub 1191b58083 Add RequestParts::extract (#897) 2022-04-01 09:25:15 +02:00
Jonas PlatteandGitHub 422a883cb2 Fix two separate lists in Tutorials section of ECOSYSTEM.md (#854) 2022-03-12 22:09:30 +01:00
Jonas PlatteandGitHub 80753f8f5c Remove unnecessary mut from (Signed)CookieJar examples (#850) 2022-03-10 12:53:51 +01:00
Jonas PlatteandGitHub 79b94b9bd6 Replace set_var usage in examples (#829)
* examples: Fix inconsistent toml formatting

* examples: Replace set_var usage
2022-03-06 12:37:00 +01:00
Jonas PlatteandGitHub 9470f5ae1d Update MSRV in .clippy.toml (#832) 2022-03-05 14:23:27 +01:00
Jonas PlatteandGitHub b6862ff63d ci: Set CARGO_TERM_COLOR = always to get colored logs (#831) 2022-03-05 12:13:53 +01:00
Jonas PlatteandGitHub ab486198e6 Fix typo in CHANGELOG.md (#822) 2022-03-04 00:18:37 +01:00