Skip to content

Commit 936ce39

Browse files
authored
Merge branch 'main' into feat/proposal-form-template-test
2 parents 777cb59 + fd709ef commit 936ce39

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

rust/signed_doc/src/validator/rules/content_type.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ impl ContentTypeRule {
8383
);
8484
return Ok(false);
8585
};
86-
if !validate(exp, &content) {
86+
if !validate(*exp, &content) {
8787
doc.report().invalid_value(
8888
"payload",
8989
&hex::encode(content),
@@ -108,11 +108,7 @@ fn validate(
108108
},
109109
ContentType::Cbor => {
110110
let mut decoder = minicbor::Decoder::new(content);
111-
if decoder.skip().is_ok() && decoder.position() == content.len() {
112-
true
113-
} else {
114-
false
115-
}
111+
decoder.skip().is_ok() && decoder.position() == content.len()
116112
},
117113
ContentType::SchemaJson => {
118114
let Ok(template_json_schema) = serde_json::from_slice(content) else {

0 commit comments

Comments
 (0)