Skip to content

Commit

Permalink
make clippy happy
Browse files Browse the repository at this point in the history
  • Loading branch information
tcoratger committed Feb 17, 2024
1 parent 7247e7e commit 2a1c329
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions starknet-ff/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ impl FieldElement {
}

Fr::from_bigint(u256_to_biginteger256(&res))
.map(|inner| Self(inner))
.map(Self)
.ok_or(FromStrError::OutOfRange)
}

Expand Down Expand Up @@ -269,7 +269,7 @@ impl FieldElement {
}

pub fn invert(&self) -> Option<FieldElement> {
self.inverse().map(|inner| Self(inner))
self.inverse().map(Self)
}

pub fn sqrt(&self) -> Option<FieldElement> {
Expand Down Expand Up @@ -312,7 +312,7 @@ impl FieldElement {

// No need to check range as `from_bigint` already does that
let big_int = BigInteger256::from_bits_be(&bits);
Fr::from_bigint(big_int).map(|inner| Self(inner))
Fr::from_bigint(big_int).map(Self)
}
}

Expand Down Expand Up @@ -374,7 +374,7 @@ impl ops::Neg for FieldElement {
type Output = FieldElement;

fn neg(self) -> Self::Output {
FieldElement { 0: -self.0 }
FieldElement(-self.0)
}
}

Expand Down

0 comments on commit 2a1c329

Please sign in to comment.