mirror of
https://github.com/tokio-rs/axum.git
synced 2026-09-06 00:00:17 +02:00
Revert "Make status a const function in rejection handling" (#3287)
This commit is contained in:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user