Skip to content

Commit 0a67496

Browse files
committed
axum-core/macros: Change Display impl to match body_text() result
It seems less useful to only display `$body` without any information about the inner error. Since `body_text()` already combines both, this commit changes the `Display` impl to display the same.
1 parent fd60c84 commit 0a67496

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

axum-core/src/macros.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ macro_rules! __define_rejection {
132132

133133
impl std::fmt::Display for $name {
134134
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
135-
write!(f, "{}", $body)
135+
write!(f, concat!($body, ": {}"), self.0)
136136
}
137137
}
138138

0 commit comments

Comments
 (0)