Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions rust/signed_doc/src/metadata/content_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ impl ContentType {
impl Display for ContentType {
fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), std::fmt::Error> {
match self {
Self::Cbor => write!(f, "cbor"),
Self::Json => write!(f, "json"),
Self::Cbor => write!(f, "application/cbor"),
Self::Json => write!(f, "application/json"),
}
}
}
Expand All @@ -51,8 +51,8 @@ impl FromStr for ContentType {

fn from_str(s: &str) -> Result<Self, Self::Err> {
match s {
"cbor" => Ok(Self::Cbor),
"json" => Ok(Self::Json),
"application/cbor" => Ok(Self::Cbor),
"application/json" => Ok(Self::Json),
_ => {
anyhow::bail!(
"Unsupported Content Type: {s:?}, Supported only: {:?}",
Expand Down