diff --git a/axum-core/CHANGELOG.md b/axum-core/CHANGELOG.md index eac0e47a..ee693f68 100644 --- a/axum-core/CHANGELOG.md +++ b/axum-core/CHANGELOG.md @@ -7,11 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 # 0.5.1 -- **change:** Make the `status` function for rejections generated by the - `__define_rejection` and `__composite_rejection` macros a `const` function - ([#3168]) +Yanked from crates.io due to unforeseen breaking change, see [#3190] for details. -[#3168]: https://github.com/tokio-rs/axum/pull/3168 +[#3190]: https://github.com/tokio-rs/axum/pull/3190 # 0.5.0 diff --git a/axum-core/src/macros.rs b/axum-core/src/macros.rs index 7311fdfb..8f276248 100644 --- a/axum-core/src/macros.rs +++ b/axum-core/src/macros.rs @@ -54,7 +54,7 @@ macro_rules! __define_rejection { } /// Get the status code used for this rejection. - pub const fn status(&self) -> http::StatusCode { + pub fn status(&self) -> http::StatusCode { http::StatusCode::$status } } @@ -111,7 +111,7 @@ macro_rules! __define_rejection { } /// Get the status code used for this rejection. - pub const fn status(&self) -> http::StatusCode { + pub fn status(&self) -> http::StatusCode { http::StatusCode::$status } } @@ -188,7 +188,7 @@ macro_rules! __composite_rejection { } /// Get the status code used for this rejection. - pub const fn status(&self) -> http::StatusCode { + pub fn status(&self) -> http::StatusCode { match self { $( Self::$variant(inner) => inner.status(), diff --git a/axum-extra/CHANGELOG.md b/axum-extra/CHANGELOG.md index 725d2cb0..8ecd8b9f 100644 --- a/axum-extra/CHANGELOG.md +++ b/axum-extra/CHANGELOG.md @@ -5,19 +5,22 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog], and this project adheres to [Semantic Versioning]. -# 0.11.0 +# Unreleased - **breaking:** Remove unused `async-stream` feature, which was accidentally introduced as an implicit feature through an optional dependency which was no longer being used ([#3145]) - **fixed:** Fix a broken link in the documentation of `ErasedJson` ([#3186]) -- **changed:** Make the `status` function of rejections a `const` function, such - as `FormRejection`, `QueryRejection` and `MultipartRejection` ([#3168]) [#3145]: https://github.com/tokio-rs/axum/pull/3145 -[#3168]: https://github.com/tokio-rs/axum/pull/3168 [#3186]: https://github.com/tokio-rs/axum/pull/3186 +# 0.11.0 + +Yanked from crates.io due to unforeseen breaking change, see [#3190] for details. + +[#3190]: https://github.com/tokio-rs/axum/pull/3190 + # 0.10.0 ## since rc.1 diff --git a/axum/CHANGELOG.md b/axum/CHANGELOG.md index b0e306c8..e099290e 100644 --- a/axum/CHANGELOG.md +++ b/axum/CHANGELOG.md @@ -8,21 +8,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 # Unreleased - **added:** Implement `From` for `Message` ([#3273]) +- **added:** Implement `OptionalFromRequest` for `Json` ([#3142]) +- **added:** Implement `OptionalFromRequest` for `Extension` ([#3157]) - **changed:** Improved code size / compile time of `Handler` implementations ([#3285]) [#3273]: https://github.com/tokio-rs/axum/pull/3273 +[#3142]: https://github.com/tokio-rs/axum/pull/3142 +[#3157]: https://github.com/tokio-rs/axum/pull/3157 [#3285]: https://github.com/tokio-rs/axum/pull/3285 # 0.8.2 -- **added:** Implement `OptionalFromRequest` for `Json` ([#3142]) -- **added:** Implement `OptionalFromRequest` for `Extension` ([#3157]) -- **changed:** Make the `status` function of rejections a `const` function, such - as `JsonRejection`, `QueryRejection` and `PathRejection` ([#3168]) +Yanked from crates.io due to unforeseen breaking change, see [#3190] for details. -[#3142]: https://github.com/tokio-rs/axum/pull/3142 -[#3157]: https://github.com/tokio-rs/axum/pull/3157 -[#3168]: https://github.com/tokio-rs/axum/pull/3168 +[#3190]: https://github.com/tokio-rs/axum/pull/3190 # 0.8.1 diff --git a/axum/src/extract/path/mod.rs b/axum/src/extract/path/mod.rs index 6dab914b..e883c643 100644 --- a/axum/src/extract/path/mod.rs +++ b/axum/src/extract/path/mod.rs @@ -429,7 +429,7 @@ impl FailedToDeserializePathParams { } /// Get the status code used for this rejection. - pub const fn status(&self) -> StatusCode { + pub fn status(&self) -> StatusCode { match self.0.kind { ErrorKind::Message(_) | ErrorKind::DeserializeError { .. } @@ -563,7 +563,7 @@ impl InvalidUtf8InPathParam { } /// Get the status code used for this rejection. - pub const fn status(&self) -> StatusCode { + pub fn status(&self) -> StatusCode { StatusCode::BAD_REQUEST } }