Skip to content

Commit bf843d4

Browse files
Fix the 'decode_any' usage
1 parent 068cbdf commit bf843d4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

rust/rbac-registration/src/cardano/cip509/rbac/metadata.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ impl Decode<'_, DecodeContext<'_, '_>> for Cip509RbacMetadata {
158158

159159
match decode_any(d, "purpose key") {
160160
Ok(v) => {
161-
purpose_key_data.insert(key, v);
161+
purpose_key_data.insert(key, v.to_vec());
162162
},
163163
Err(e) => {
164164
decode_context

rust/rbac-registration/src/cardano/cip509/rbac/role_data.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ impl Decode<'_, ProblemReport> for CborRoleData {
9696
continue;
9797
},
9898
};
99-
if data.extended_data.insert(key, value).is_some() {
99+
if data.extended_data.insert(key, value.to_vec()).is_some() {
100100
report.other(
101101
&format!("Duplicated {key} key in the role extended data"),
102102
context,

0 commit comments

Comments
 (0)