Skip to content

Commit 2a8c4bd

Browse files
committed
Apply reviewer's suggestion
Signed-off-by: Christian König <[email protected]>
1 parent 27d3c9e commit 2a8c4bd

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

core/src/mercury/types.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,13 @@ impl From<MercuryError> for Error {
5151

5252
impl std::fmt::Display for MercuryMethod {
5353
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
54-
match *self {
55-
MercuryMethod::Get => write!(f, "GET"),
56-
MercuryMethod::Sub => write!(f, "SUB"),
57-
MercuryMethod::Unsub => write!(f, "UNSUB"),
58-
MercuryMethod::Send => write!(f, "SEND"),
59-
}
54+
let s = match *self {
55+
MercuryMethod::Get => "GET",
56+
MercuryMethod::Sub => "SUB",
57+
MercuryMethod::Unsub => "UNSUB",
58+
MercuryMethod::Send => "SEND",
59+
};
60+
write!(f, "{}", s)
6061
}
6162
}
6263

0 commit comments

Comments
 (0)