Skip to content

Commit

Permalink
Add comment to ArrayU32AppendFelt
Browse files Browse the repository at this point in the history
  • Loading branch information
fmkra committed Jan 4, 2024
1 parent 72e23d8 commit 031b204
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/common/array_append.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ impl ArrayU32AppendU256 of ArrayAppendTrait<u32, u256> {
}
}

// input's MSB is padded with 0s
// (internally felt252 is converted to u256)
impl ArrayU32AppendFelt of ArrayAppendTrait<u32, felt252> {
fn append_little_endian(ref self: Array<u32>, element: felt252) {
self.append_little_endian(Into::<felt252, u256>::into(element));
Expand Down

0 comments on commit 031b204

Please sign in to comment.