Skip to content

Commit 94d74f6

Browse files
committed
fix error message for ContentType
1 parent ef5c92e commit 94d74f6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

rust/signed_doc/src/metadata/content_type.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ impl FromStr for ContentType {
5757
anyhow::bail!(
5858
"Unsupported Content Type: {s:?}, Supported only: {:?}",
5959
ContentType::VARIANTS
60+
.iter()
61+
.map(ToString::to_string)
62+
.collect::<Vec<_>>()
6063
)
6164
},
6265
}
@@ -91,6 +94,9 @@ impl TryFrom<&coset::ContentType> for ContentType {
9194
anyhow::bail!(
9295
"Unsupported Content Type {value:?}, Supported only: {:?}",
9396
ContentType::VARIANTS
97+
.iter()
98+
.map(ToString::to_string)
99+
.collect::<Vec<_>>()
94100
)
95101
},
96102
};

0 commit comments

Comments
 (0)