Skip to content

Commit f4b46e5

Browse files
authored
chore: Fix labels in Display for Status (#2414)
* Follow-up to #2403 I accidentally used confusing labels. Thanks to @kloakin for pointing it out.
1 parent d02ee2d commit f4b46e5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tonic/src/status.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -748,10 +748,10 @@ impl From<std::io::Error> for Status {
748748

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

753753
if !self.message().is_empty() {
754-
write!(f, ", self: {:?}", self.message())?;
754+
write!(f, ", message: {:?}", self.message())?;
755755
}
756756
// We intentionally omit `self.details` since it's binary data, not fit for human eyes.
757757
if !self.metadata().is_empty() {

0 commit comments

Comments
 (0)