Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tonic/src/status.rs
Original file line number Diff line number Diff line change
Expand Up @@ -748,10 +748,10 @@ impl From<std::io::Error> for Status {

impl fmt::Display for Status {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "status: '{}'", self.code())?;
write!(f, "code: '{}'", self.code())?;
Copy link

@kloakin kloakin Sep 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code may be more clear
but the old format string was "status: {:?}, message: {:?}, details: {:?}, metadata: {:?}"
so I think either one might be ok


if !self.message().is_empty() {
write!(f, ", self: {:?}", self.message())?;
write!(f, ", message: {:?}", self.message())?;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

}
// We intentionally omit `self.details` since it's binary data, not fit for human eyes.
if !self.metadata().is_empty() {
Expand Down
Loading