Skip to content

Commit

Permalink
Simplify conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
Remco Bloemen committed Oct 19, 2020
1 parent 342e014 commit dc247a6
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions algebra/u256/src/conversion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,7 @@ impl<'a> Deserialize<'a> for U256 {

impl From<bool> for U256 {
fn from(n: bool) -> Self {
if n {
U256::one()
} else {
U256::zero()
}
Self::from_limbs([u64::from(n), 0, 0, 0])
}
}

Expand Down

0 comments on commit dc247a6

Please sign in to comment.