Commit Graph
100 Commits
Author SHA1 Message Date
David Pedersen 2e8a7e51a1 Fix Handler::with_state not working if request body was changed via layer (#1536)
Previously

```rust
handler.layer(RequestBodyLimitLayer::new(...)).with_state(...)
```

didn't work because we required the same request body all the way
through.
2022-11-18 11:00:52 +01:00
David Pedersen b1f894a500 Fix unused import if compiling with default features 2022-11-18 00:22:11 +01:00
David Pedersen 74bbe80f8a axum 0.6.0-rc.4 (#1518) 2022-11-09 13:49:47 +01:00
David Pedersen 028cac4a72 Fix compile error in release mode (#1517) 2022-11-09 13:36:10 +01:00
David Pedersen 1d6a96ee20 Remove references to *_with_state_arc functions from changelog
They were removed again before being released.
2022-11-09 09:27:37 +01:00
David Pedersen e53c85c496 Minor changelog fixes 2022-11-09 09:20:09 +01:00
David PedersenandJonas Platte e39d053d2f New release candidates (#1514)
* New release candidates

* Update axum/Cargo.toml

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

Co-authored-by: Jonas Platte <[email protected]>
2022-11-09 09:01:47 +01:00
David Pedersen 9c804d506e Update changelog for axum-extra 2022-11-08 21:45:05 +01:00
David PedersenandJonas Platte 0e3f9d0938 Don't allow extracting MatchedPath in middleware for nested routes (#1462)
* Don't allow extracting `MatchedPath` for nested paths

* misc clean up

* Update docs

* changelog

* Apply suggestions from code review

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

* Add test for nested handler service

* change to `debug_assert`

* apply suggestions from review

Co-authored-by: Jonas Platte <[email protected]>
2022-11-08 20:43:19 +00:00
David Pedersen e0ef641e5f Rework Form and Query rejections (#1496)
* Change `FailedToDeserializeQueryString` rejection for `Form`

Its now called `FailedToDeserializeForm`.

* changelog

* Make dedicate rejection type for axum-extra's `Form`

* update trybuild test

* Make dedicate rejection type for axum-extra's `Query`
2022-11-08 20:31:06 +00:00
David Pedersen a27bd2c6a2 Update trybuild tests for Rust 1.65.0 (#1509) 2022-11-04 09:07:57 +01:00
David PedersenandJonas Platte b59c7a8c84 Add example for Router::inherit_state (#1492)
* Add example for `Router::inherit_state`

* clarification

* Update axum/src/routing/mod.rs

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

Co-authored-by: Jonas Platte <[email protected]>
2022-10-20 19:19:05 +00:00
David Pedersen 958d360ac4 Generalize AppendHeaders to accept any impl IntoIterator (#1495)
* Generalize `AppendHeaders` to accept any `impl IntoIterator`

* changelog
2022-10-20 21:05:04 +02:00
David Pedersen 4979b4c9b6 Implement Form in terms of RawForm 2022-10-20 20:55:11 +02:00
David Pedersen 7caa4a3a47 Link to fork of realworld-axum-sqlx 2022-10-14 23:42:58 +02:00
David Pedersen 199a7a66b8 Expand static file serving example (#1471) 2022-10-11 07:42:48 +00:00
David Pedersen 9c0a89cd09 Add #[derive(FromRef)] (#1430)
* add `#[derive(FromRef)]`

* tests

* don't support skipping fields

probably wouldn't work at all since the whole state likely needs `Clone`

* UI tests

* changelog

* changelog link

* revert hello-world example, used for testing

* Re-export `#[derive(FromRef)]`

* Don't need to return `Result`

* use `collect` instead of quoting the iterator

* Mention it in axum's changelog
2022-10-10 18:40:14 +00:00
David Pedersen 1681ecf438 Copy changelogs from 0.5.x branch 2022-10-10 20:23:11 +02:00
David Pedersen d7ba0b1d72 Relax bounds for FromExtractor (#1469)
Fixes #1467

We didn't actually use the bounds. I guess they were left over from a
previous version.
2022-10-10 16:39:16 +00:00
David Pedersen 70833b9f4f Document differences between DefaultBodyLimit and RequestBodyLimit (#1461)
* Document differences between `DefaultBodyLimit` and `RequestBodyLimit`

* fix grammar

* fix accidental force push
2022-10-10 17:43:05 +02:00
David Pedersen 7420721f4d Document RouterService (#1465)
Not sure what else there is to say :P

Fixes https://github.com/tokio-rs/axum/issues/1401
2022-10-10 00:23:11 +02:00
David Pedersen b607ad5823 Improve map_response docs (#1464)
* Document when extractors run

* Document returning `impl IntoResponse`
2022-10-09 23:33:22 +02:00
David Pedersen f9dc96fdce Don't internally Arc the state (#1460) 2022-10-09 20:55:28 +00:00
David Pedersen a57bd9a118 Move changelog item to "unreleased" 2022-10-04 14:25:31 +02:00
David Pedersen 04ef2f1bc0 Add map_response and friends (#1414)
* Add `map_response` and friends

* changelog
2022-09-25 16:21:30 +02:00
David Pedersen 0e4a894c16 Fix formatting of one more macro 2022-09-25 15:26:36 +02:00
David Pedersen bf341fd034 Refactor all_the_tuples! macros (#1413) 2022-09-25 15:22:40 +02:00
David Pedersen 8dd9c8d286 Add missing changelog PR links 2022-09-25 14:41:15 +02:00
David PedersenandJonas Platte 2077d50021 Add map_request and friends (#1408)
* Add `map_request` and friends

* finish it

* changelog ref

* Apply suggestions from code review

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

* address review feedback

* Apply suggestions from code review

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

Co-authored-by: Jonas Platte <[email protected]>
2022-09-25 11:44:10 +00:00
David Pedersen c3f3db79ec Support State with #[derive(FromRequest[Parts])] (#1391)
* Support `State` with `#[derive(FromRequest[Parts])]`

Fixes https://github.com/tokio-rs/axum/issues/1314

This makes it possible to extract things via `State` in
`#[derive(FromRequet)]`:

```rust
struct Foo {
    state: State<AppState>,
}
```

The state can also be inferred in a lot of cases so you only need to
write:

```rust
struct Foo {
    // since we're using `State<AppState>` we know the state has to be
    // `AppState`
    state: State<AppState>,
}
```

Same for

```rust
struct Foo {
    #[from_request(via(State))]
    state: AppState,
}
```

And

```rust
struct AppState {}
```

I think I've covered all the edge cases but there are (unsurprisingly) a
few.

* make sure things can be combined with other extractors

* main functions in ui tests don't need to be async

* Add test for multiple identicaly state types

* Add failing test for multiple states
2022-09-23 23:50:50 +02:00
David Pedersen 611c50ec8b Add middleware::from_extractor_with_state (#1396)
Fixes https://github.com/tokio-rs/axum/issues/1373
2022-09-20 10:13:06 +02:00
David Pedersen 112f5354ab Add example showing how to return anyhow::Errors (#1398) 2022-09-19 20:42:08 +00:00
David Pedersen de9909d955 Add DefaultBodyLimit::max to change the body size limit (#1397) 2022-09-19 22:41:54 +02:00
David Pedersen c93d7c324e Fix typo in docs 2022-09-18 22:24:11 +02:00
David Pedersen 21876fcc64 Clarify Clone requirements for using State (#1388) 2022-09-18 22:22:47 +02:00
David Pedersen c81549d95b Support streaming/chunked requests in ContentLengthLimit (#1389)
* Support streaming/chunked requests in `ContentLengthLimit`

* changelog
2022-09-18 20:21:38 +00:00
David Pedersen 8e52c5246f Use 400 Bad Request for FailedToDeserializeQueryString rejections (#1387)
* Use `400 Bad Request` for `FailedToDeserializeQueryString` rejections

Fixes https://github.com/tokio-rs/axum/issues/1378

From [the spec] about `422 Unprocessable Entity`:

> For example, this error condition may occur if an XML request body
> contains well-formed (i.e., syntactically correct), but semantically
> erroneous, XML instructions.

I understand this to mean that query params shouldn't use 422 because
that is about the request body.

So this changes `FailedToDeserializeQueryString` from `422 Unprocessable
Entity` to `400 Bad Request`.

[the spec]: https://datatracker.ietf.org/doc/html/rfc4918#section-11.2

* changelog
2022-09-18 21:32:47 +02:00
David Pedersen 2abda4de88 Port other proc-macros to new attribute parsing (#1372) 2022-09-12 21:26:10 +02:00
David Pedersen 8da69a98fc Refactor proc-macro attribute parsing (#1369)
* Refactor proc-macro attribute parsing

* Remove `#[allow(warnings)]` which was accidentally committed

* Change span for "cannot use `rejection` without `via`" error for enums

* fix test
2022-09-12 20:10:58 +02:00
David PedersenandJonas Platte 54d8439e35 Ship rc.2 (#1363)
* rc.2

* don't bump version of axum-macros

* fix

* Update axum/Cargo.toml

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

* undo release of axum-extra

* fix

Co-authored-by: Jonas Platte <[email protected]>
2022-09-11 16:42:04 +02:00
David Pedersen 759e988747 Limit size of request bodies in Bytes extractor (#1346)
* Apply default limit to request body size

* Support disabling the default limit

* docs

* changelog
2022-09-10 06:36:30 +00:00
David Pedersen 4c9edb4cd4 Add middleware::{from_fn_with_state, from_fn_with_state_arc} (#1342) 2022-08-31 18:28:54 +00:00
David Pedersen 3f92f7d254 Improve opaque error message for Handler::layer (#1336) 2022-08-28 22:17:05 +02:00
David Pedersen eb6451c4fe Clarify Clone requirements even if using Router::with_state_arc (#1329) 2022-08-26 07:42:32 +00:00
David Pedersen eaabdb3973 Update out of date Router::nest docs (#1328) 2022-08-25 23:35:38 +02:00
David PedersenandJonas Platte 6d7c277700 Add example for parsing body based on Content-Type (#1320)
* Add example for parsing body based on `Content-Type`

* format

* Update examples/parse-body-based-on-content-type/src/main.rs

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

* fix copy/paste errors

* rename type params

Co-authored-by: Jonas Platte <[email protected]>
2022-08-25 16:04:54 +02:00
David Pedersen 169e2f7c24 Mention FromRef, not From, in State docs (#1311) 2022-08-24 00:10:51 +02:00
David Pedersen b315b60bca Bump version of all crates (#1310)
* Bump version of all crates

* use the right versions inside the workspace
2022-08-23 22:57:13 +02:00
David Pedersen db08419a3b Tweak layer and route_layer docs (#1307) 2022-08-23 16:56:24 +00:00
David Pedersen 0e04260a27 Show path in panic message when merging overlapping MethodRouters (#1306) 2022-08-23 16:32:34 +02:00
David Pedersen fa51cf5266 Support turning any Service into a MakeService (#1302)
* Add `ServiceExt`

* changelog
2022-08-22 22:03:48 +02:00
David Pedersen ab36e65449 Add RequestExt and RequestPartsExt (#1301)
* Add `RequestExt` and `RequestPartsExt`

* don't double box futures

* changelog pr link
2022-08-22 18:34:46 +02:00
David Pedersen e3ebb62c3f Document limitation with implementing both FromRequest and FromRequestParts (#1300)
* Document limitation with implementing both `FromRequest` and `FromRequestParts`

* Add mention about "Wrapping extractors" section
2022-08-22 18:01:56 +02:00
David Pedersen bb05dea672 Generate correct bound for non-last extractor in #[debug_handler] (#1299)
* Support running a single UI test

* Generate correct `FromRequestParts` bound

* don't depend on itertools
2022-08-22 15:34:17 +02:00
David PedersenandJonas Platte be624306f4 Only allow last extractor to mutate the request (#1272)
* Only allow last extractor to mutate the request

* Change `FromRequest` and add `FromRequestParts` trait (#1275)

* Add `Once`/`Mut` type parameter for `FromRequest` and `RequestParts`

* 🪄

* split traits

* `FromRequest` for tuples

* Remove `BodyAlreadyExtracted`

* don't need fully qualified path

* don't export `Once` and `Mut`

* remove temp tests

* depend on axum again

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

* Port `Handler` and most extractors (#1277)

* Port `Handler` and most extractors

* Put `M` inside `Handler` impls, not trait itself

* comment out tuples for now

* fix lints

* Reorder arguments to `Handler` (#1281)

I think `Request<B>, Arc<S>` is better since its consistent with
`FromRequest` and `FromRequestParts`.

* Port most things in axum-extra (#1282)

* Port `#[derive(TypedPath)]` and `#[debug_handler]` (#1283)

* port #[derive(TypedPath)]

* wip: #[debug_handler]

* fix #[debug_handler]

* don't need itertools

* also require `Send`

* update expected error

* support fully qualified `self`

* Implement FromRequest[Parts] for tuples (#1286)

* Port docs for axum and axum-core (#1285)

* Port axum-extra (#1287)

* Port axum-extra

* Update axum-core/Cargo.toml

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

* remove `impl FromRequest for Either*`

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

* New FromRequest[Parts] trait cleanup (#1288)

* Make private module truly private again

* Simplify tuple FromRequest implementation

* Port `#[derive(FromRequest)]` (#1289)

* fix tests

* fix docs

* revert examples

* fix docs link

* fix intra docs links

* Port examples (#1291)

* Document wrapping other extractors (#1292)

* axum-extra doesn't need to depend on axum-core (#1294)

Missed this in https://github.com/tokio-rs/axum/pull/1287

* Add `FromRequest` changes to changelogs (#1293)

* Update changelog

* Remove default type for `S` in `Handler`

* Clarify which types have default types for `S`

* Apply suggestions from code review

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

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

* remove unused import

* Rename `Mut` and `Once` (#1296)

* fix trybuild expected output

Co-authored-by: Jonas Platte <[email protected]>
2022-08-22 12:23:20 +02:00
David Pedersen f1769e5134 Re-organize changelog to make updating to 0.6 easier (#1274) 2022-08-20 21:11:02 +02:00
David Pedersen 79f6aabd02 Make extractor field public in example 2022-08-19 22:38:46 +02:00
David Pedersen 18dd830b84 Add #[non_exhaustive] to ProtoBufRejection (#1280) 2022-08-19 10:17:40 +00:00
David Pedersen 568394a28e Support changing state type in #[debug_handler] (#1271)
* support setting body type for #[debug_handler]

* Use lookahead1 to give better errors and detect duplicate arguments

* fix docs link
2022-08-18 11:41:14 +02:00
David Pedersen e7f1c88cd4 Always store state in an Arc (#1270)
* Add extension and state benchmarks

* wip

* Arc the state everywhere

* don't require `S: Clone`

* fix example
2022-08-17 20:08:24 +00:00
423308de3c Add type safe state extractor (#1155)
* begin threading the state through

* Pass state to extractors

* make state extractor work

* make sure nesting with different states work

* impl Service for MethodRouter<()>

* Fix some of axum-macro's tests

* Implement more traits for `State`

* Update examples to use `State`

* consistent naming of request body param

* swap type params

* Default the state param to ()

* fix docs references

* Docs and handler state refactoring

* docs clean ups

* more consistent naming

* when does MethodRouter implement Service?

* add missing docs

* use `Router`'s default state type param

* changelog

* don't use default type param for FromRequest and RequestParts

probably safer for library authors so you don't accidentally forget

* fix examples

* minor docs tweaks

* clarify how to convert handlers into services

* group methods in one impl block

* make sure merged `MethodRouter`s can access state

* fix docs link

* test merge with same state type

* Document how to access state from middleware

* Port cookie extractors to use state to extract keys (#1250)

* Updates ECOSYSTEM with a new sample project (#1252)

* Avoid unhelpful compiler suggestion (#1251)

* fix docs typo

* document how library authors should access state

* Add `RequestParts::with_state`

* fix example

* apply suggestions from review

* add relevant changes to axum-extra and axum-core changelogs

* Add `route_service_with_tsr`

* fix trybuild expectations

* make sure `SpaRouter` works with routers that have state

* Change order of type params on FromRequest and RequestParts

* reverse order of `RequestParts::with_state` args to match type params

* Add `FromRef` trait (#1268)

* Add `FromRef` trait

* Remove unnecessary type params

* format

* fix docs link

* format examples

* Avoid unnecessary `MethodRouter`

* apply suggestions from review

Co-authored-by: Dani Pardo <[email protected]>
Co-authored-by: Jonas Platte <[email protected]>
2022-08-17 15:13:31 +00:00
David Pedersen 90dbd52ee4 Fix lint warnings (#1267) 2022-08-17 09:41:52 +00:00
David Pedersen f2243c4db0 Make WithRejection::into_inner public (#1266) 2022-08-17 08:59:16 +00:00
David PedersenandJonas Platte e22f6f9d2b Add Either{2..8} to axum-extra (#1263)
* Add `Either{2..8}`

* Apply suggestions from code review

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

* Either2 => Either

* Update axum-extra/src/either.rs

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

Co-authored-by: Jonas Platte <[email protected]>
2022-08-17 08:57:19 +00:00
David Pedersen 01630cfef6 Add sync constructors to CookieJar, SignedCookieJar, and PrivateCookieJar (#1264)
* Add sync constructors to `CookieJar`, `SignedCookieJar`, and `PrivateCookieJar`

* Move to constructor

* use `RequestParts::extract`
2022-08-16 15:42:01 +02:00
David Pedersen fb32fcc07c Add protobuf extractor and response to changelog 2022-08-15 15:57:07 +02:00
David Pedersen ac7037d282 Support using a different rejection for #[derive(FromRequest)] (#1256) 2022-08-12 16:05:27 +00:00
David Pedersen 6cd356690d Annotate panicking functions with #[track_caller] (#1248) 2022-08-11 12:45:42 +02:00
David PedersenandJonas Platte 50a4be999d Update matchit and fix nesting inconsistencies (#1086)
* Break `Router::nest` into `nest` and `nest_service` methods

* fix doc tests

* update docs

* fix

* Only accept `Router` in `Resource::{nest, nest_collection}`

* update changelog

* fix docs

* fix `MatchedPath` with `Router`s nested with `nest_service`

* Apply suggestions from code review

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

* adjust docs for fallbacks

* Always nest services as opaque

* fix old docs reference

* more tests for `MatchedPath` with nested handlers

* minor clean up

* use identifier captures in format strings

* Apply suggestions from code review

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

* fix test

Co-authored-by: Jonas Platte <[email protected]>
2022-08-11 10:17:08 +00:00
David Pedersen 0090d007c0 Fix benchmark filtering 2022-08-11 11:12:04 +02:00
David Pedersen 9e50bf16fb Add initial benchmarks (#1243)
* Add initial benchmarks

* improve error message if rewrk isn't installed

* what env vars does github ci have?

* run benchmarks for a bit on ci

* debug error

* ignore args on ci

* actually also locally

* apply review suggestions
2022-08-11 08:52:23 +00:00
David Pedersen c72ee6eca9 Document browsers ignoring SSE events without data fields (#1242)
* Document browsers ignoring SSE events without data fields

* only add note on `Event::data`
2022-08-10 10:40:31 +00:00
David Pedersen 9b44654c86 Add "Ordering" link to middleware table of contents (#1241)
Seems I forgot to add it.
2022-08-10 12:34:05 +02:00
David Pedersen e79820dbc4 Support chaining handlers with one.or(two).or(three) (#1170)
* WIP: Handler fallbacks

* Docs

* box futures a bit less

* changelog
2022-08-10 10:09:08 +00:00
David PedersenandJonas Platte d9ef24c5ff Replace async-graphql with link to async-graphql's own examples (#1234)
* Replace async-graphql with link to async-graphql's own examples

* exclude async-graphql directory

* does this fix it?

* apparently this needs to be sorted as well

* Update .github/workflows/CI.yml

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

Co-authored-by: Jonas Platte <[email protected]>
2022-08-09 14:56:50 +00:00
David Pedersen 3bcc8fb07d fix typo in CI.yml 2022-07-26 14:03:35 +02:00
David Pedersen 10ab8c7aba Add missing cfg to axum_extra::extract::Form (#1194) 2022-07-26 00:25:45 +02:00
David Pedersen 234c8ccb13 Improve build times by generating less IR (#1192)
* example

* `MethodRouter::merge`

* `set_content_length` and `set_allow_header`

* `MethodRouter::on_service_boxed_response_body`

* `Router::route`

* `MethodRouter::merge` again

* `MethodRouter::on_service_boxed_response_body`

* `Router::call_route`

* `MethodRouter::{layer, route_layer}`

* revert example

* fix test

* move function to method on `AllowHeader`
2022-07-25 18:06:37 +00:00
David Pedersen b243e171fd Accept S::Response: IntoResponse everywhere (#1165) 2022-07-19 18:55:15 +02:00
David Pedersen 329bd5f9b4 Support any middleware response that implements IntoResponse (#1152)
* Support any middleware response that implements `IntoResponse`

* Require `Infallible` for middleware added with `Handler::layer`
2022-07-13 08:38:19 +00:00
David Pedersen 92dbbd3182 Return rejection if WebSocket request couldn't be upgraded (#1135)
* Return rejection if `WebSocket` request couldn't be upgraded

* make rejection about connection upgrades

* changelog links
2022-07-11 14:33:55 +02:00
David Pedersen 8c9998eab7 Don't derive debug impl for Resource (#1153)
We don't actually require `B` to be `Debug` but the derived impl does.
2022-07-11 09:41:41 +02:00
David Pedersen bed0b83421 Add http-server as crates.io subcategory 2022-07-10 14:28:11 +02:00
David Pedersen 605980b21c Add introduction to axum talk to ECOSYSTEM.md 2022-07-07 22:48:30 +02:00
David Pedersen 2966407dc1 Re-export debug_handler from axum (#1144)
* Re-export `debug_handler` from axum

Fixes #1143

* also axum-extra
2022-07-04 09:10:52 +00:00
David Pedersen 2e80ebd18d Support running extractors from middleware::from_fn 2022-07-03 16:49:20 +02:00
David Pedersen f8c8f5b697 Add note about breaking changes to readme 2022-07-02 11:46:53 +02:00
David Pedersen eff3b716d3 Document running extractors from middleware (#1140)
Fixes #1134
2022-07-02 09:44:17 +00:00
David Pedersen 698b5ccf39 Update trybuilds for rust 1.62 2022-07-01 10:24:15 +02:00
David PedersenandJonas Platte a4c820420d Remove trailing slash redirects (#1119)
* Prepare axum-next branch

* Remove deprecated `extractor_middleware` function (#1077)

* Allow `Error: Into<Infallible>` for `Route::{layer, route_layer}` (#948)

* Allow `Error: Into<Infallible>` for `Route::{layer, route_layer}` (#924)

* Allow `Error: Into<Infallible>` for `Route::{layer, route_layer}`

Fixes https://github.com/tokio-rs/axum/issues/922

* changelog

* fixup changelog

* Panic on overlapping routes in `MethodRouter` (#1102)

* Panic on overlapping routes in `MethodRouter`

* changelog link

* add test to ensure `head` and `get` don't overlap

* Fix changelog

* Prepare axum-next branch

* Remove trailing slash redirects

* changelog link

* Fix changelog

* remove asserting to make make the test more clear

* remove tsr related feature

* Add `RouterExt::route_with_tsr`

* Apply suggestions from code review

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

* Update axum-extra/src/routing/mod.rs

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

* fix typos in docs

* Update axum/CHANGELOG.md

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

* mention `RouterExt::route_with_tsr` in the changelog

Co-authored-by: Jonas Platte <[email protected]>
2022-06-30 00:22:43 +02:00
David Pedersen 23808f72a2 Fix changelog 2022-06-28 22:07:10 +02:00
David Pedersen 2b386c0baa Panic on overlapping routes in MethodRouter (#1102)
* Panic on overlapping routes in `MethodRouter`

* changelog link

* add test to ensure `head` and `get` don't overlap
2022-06-28 22:07:10 +02:00
David Pedersen 661473dcbc Allow Error: Into<Infallible> for Route::{layer, route_layer} (#948)
* Allow `Error: Into<Infallible>` for `Route::{layer, route_layer}` (#924)

* Allow `Error: Into<Infallible>` for `Route::{layer, route_layer}`

Fixes https://github.com/tokio-rs/axum/issues/922

* changelog

* fixup changelog
2022-06-28 22:07:10 +02:00
David Pedersen 56ddabcd7d Remove deprecated extractor_middleware function (#1077) 2022-06-28 22:07:10 +02:00
David Pedersen 7e794e9d1d axum: Version 0.5.10 (#1128) 2022-06-28 21:32:39 +02:00
David PedersenandJonas Platte a8d0ce8c03 Fix possible panic when doing trailing slash redirect (#1124)
* Fix possible panic when doing trailing slash redirect

Fixes https://github.com/tokio-rs/axum/issues/1122

* changelog link

* Update axum/src/routing/mod.rs

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

Co-authored-by: Jonas Platte <[email protected]>
2022-06-28 16:58:13 +02:00
David Pedersen 905bbfb8e2 axum-extra: Version 0.3.5 (#1125) 2022-06-27 21:08:12 +02:00
David Pedersen b10c9d34bd axum-macros: Version 0.2.3 (#1126) 2022-06-27 21:06:59 +02:00
David Pedersen 11179b8033 Silence "unnecessary use of to_string" lint for #[derive(TypedPath)] (#1117)
* Fix "unnecessary use of `to_string`" lint for `#[derive(TypedPath)]`

* changelog

* Update axum-macros/CHANGELOG.md
2022-06-27 18:57:02 +00:00
David Pedersen f6b1d35c51 Use minimal dependency versions for MSRV tests on CI (#1109) 2022-06-27 20:44:20 +02:00