Skip to content

Commit 1ac2a78

Browse files
committed
fix list_with_type
1 parent 102d99d commit 1ac2a78

File tree

1 file changed

+3
-1
lines changed
  • clarity-serialization/src/types

1 file changed

+3
-1
lines changed

clarity-serialization/src/types/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -884,7 +884,9 @@ impl Value {
884884
let expected_item_type = expected_type.get_list_item_type();
885885

886886
for item in &list_data {
887-
expected_item_type.admits(epoch, item)?;
887+
if !expected_item_type.admits(epoch, item)? {
888+
return Err(CodecError::FailureConstructingListWithType);
889+
}
888890
}
889891
}
890892

0 commit comments

Comments
 (0)