Skip to content

Commit

Permalink
fix: I128IntoI257
Browse files Browse the repository at this point in the history
  • Loading branch information
detectivekim committed Jul 1, 2024
1 parent 39ebbef commit b62cc03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/alexandria/i257.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ impl U256IntoI257 of Into<u256, i257> {
impl I128IntoI257 of Into<i128, i257> {
fn into(self: i128) -> i257 {
if self < 0 {
let abs: u128 = self.try_into().unwrap();
let abs: u128 = (-self).try_into().unwrap();
i257 { abs: abs.into(), is_negative: true }
} else {
let abs: u128 = self.try_into().unwrap();
Expand Down

0 comments on commit b62cc03

Please sign in to comment.