Skip to content

Commit

Permalink
Fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
fmoletta committed Mar 15, 2024
1 parent 34d3ba5 commit 89ad3a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cairo1-run/src/cairo_run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -967,13 +967,13 @@ fn serialize_output_inner(
// TODO: Something similar to the bool handling could be done for unit enum variants if we could get the type info with the variant names

// Space is always allocated for the largest enum member, padding with zeros in front for the smaller variants
// We have to remove this variants
let mut max_variant_size = 0;
for variant in &info.variants {
let variant_size = type_sizes.get(variant).unwrap();
max_variant_size = std::cmp::max(max_variant_size, *variant_size)
}
for _ in 0..max_variant_size - type_sizes.get(variant_type_id).unwrap() {
// Remove padding
assert_eq!(
return_values_iter.next(),
Some(&MaybeRelocatable::from(0)),
Expand Down

0 comments on commit 89ad3a3

Please sign in to comment.