We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 934915d commit 62b895cCopy full SHA for 62b895c
src/event/data.rs
@@ -2,6 +2,7 @@ use serde_json::Value;
2
use std::convert::TryFrom;
3
use std::fmt;
4
use std::fmt::Formatter;
5
+use std::str;
6
7
/// Event [data attribute](https://github.com/cloudevents/spec/blob/master/spec.md#event-data) representation
8
#[derive(PartialEq, Eq, Debug, Clone)]
@@ -81,7 +82,7 @@ impl TryFrom<Data> for String {
81
82
impl fmt::Display for Data {
83
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
84
match self {
- Data::Binary(vec) => write!(f, "Binary data: {:?}", vec),
85
+ Data::Binary(vec) => write!(f, "Binary data: {:?}", str::from_utf8(vec).unwrap()),
86
Data::String(s) => write!(f, "String data: {}", s),
87
Data::Json(j) => write!(f, "Json data: {}", j),
88
}
0 commit comments