Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Oppen committed Oct 2, 2023
1 parent 82e7b48 commit 1840022
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions crates/stark-felt/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,9 @@ impl FromPrimitive for Felt {
}

fn from_i128(value: i128) -> Option<Self> {
let mut res = Self(FieldElement::from(&UnsignedInteger::from(value.unsigned_abs())));
let mut res = Self(FieldElement::from(&UnsignedInteger::from(
value.unsigned_abs(),
)));
if value.is_negative() {
res = -res;
}
Expand Down Expand Up @@ -355,7 +357,7 @@ macro_rules! impl_from_u128 {
Self::from_u128(value as u128).expect("conversion from primitive is infallible")
}
}
}
};
}

impl_from_u128!(u8);
Expand All @@ -372,7 +374,7 @@ macro_rules! impl_from_i128 {
Self::from_i128(value as i128).expect("conversion from primitive is infallible")
}
}
}
};
}

impl_from_i128!(i8);
Expand Down

0 comments on commit 1840022

Please sign in to comment.