code format

This commit is contained in:
Martin Algesten
2018-07-02 09:10:22 +02:00
parent 9cf33365e5
commit 6d3dc75e73

View File

@@ -27,13 +27,15 @@ pub enum Payload {
impl ::std::fmt::Debug for Payload { impl ::std::fmt::Debug for Payload {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::result::Result<(), ::std::fmt::Error> { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::result::Result<(), ::std::fmt::Error> {
write!(f, "{}", match self { let s = match self {
Payload::Empty => "Empty", Payload::Empty => "Empty",
Payload::Text(t, _) => &t, Payload::Text(t, _) => &t,
#[cfg(feature = "json")] #[cfg(feature = "json")]
Payload::JSON(_) => "JSON", Payload::JSON(_) => "JSON",
Payload::Reader(_) => "Reader", Payload::Reader(_) => "Reader",
}) };
write!(f, "{}", s)
} }
} }