Skip to content

Commit

Permalink
Fix compilation (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
pefontana authored Nov 24, 2023
1 parent eb69038 commit 5c77a91
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions crates/starknet-types-core/src/felt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,7 @@ impl Felt {

result[(32 - buffer.len())..].copy_from_slice(&buffer[..]);

// safe .unwrap()
Felt::from_bytes_be(&result).unwrap()
Felt::from_bytes_be(&result)
}

// Implemention taken from Jonathan Lei's starknet-rs
Expand All @@ -301,7 +300,7 @@ impl Felt {
let mut result = [0u8; 32];
result[(32 - buffer.len())..].copy_from_slice(&buffer[..]);

Felt::from_bytes_be(&result).ok()
Some(Felt::from_bytes_be(&result))
}

/// Remainder of dividing `self` by `n` as integers.
Expand Down

0 comments on commit 5c77a91

Please sign in to comment.