File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
rust/signed_doc/src/metadata Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -40,8 +40,8 @@ impl ContentType {
4040impl Display for ContentType {
4141 fn fmt ( & self , f : & mut Formatter < ' _ > ) -> Result < ( ) , std:: fmt:: Error > {
4242 match self {
43- Self :: Cbor => write ! ( f, "cbor" ) ,
44- Self :: Json => write ! ( f, "json" ) ,
43+ Self :: Cbor => write ! ( f, "application/ cbor" ) ,
44+ Self :: Json => write ! ( f, "application/ json" ) ,
4545 }
4646 }
4747}
@@ -51,8 +51,8 @@ impl FromStr for ContentType {
5151
5252 fn from_str ( s : & str ) -> Result < Self , Self :: Err > {
5353 match s {
54- "cbor" => Ok ( Self :: Cbor ) ,
55- "json" => Ok ( Self :: Json ) ,
54+ "application/ cbor" => Ok ( Self :: Cbor ) ,
55+ "application/ json" => Ok ( Self :: Json ) ,
5656 _ => {
5757 anyhow:: bail!(
5858 "Unsupported Content Type: {s:?}, Supported only: {:?}" ,
You can’t perform that action at this time.
0 commit comments