Revert "Make status a const function in rejection handling" (#3287)

This commit is contained in:
Jonas Platte
2025-03-27 08:31:19 +01:00
committed by GitHub
parent 2b6ae09568
commit 3525a13459
5 changed files with 20 additions and 20 deletions
+3 -3
View File
@@ -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(),