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 {
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::Text(t, _) => &t,
#[cfg(feature = "json")]
Payload::JSON(_) => "JSON",
Payload::Reader(_) => "Reader",
})
};
write!(f, "{}", s)
}
}