Skip to content

Commit

Permalink
Appease clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
jplatte committed Mar 15, 2020
1 parent a105b98 commit 41bbfab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1309,7 +1309,7 @@ impl TryFrom<u128> for Int {
type Error = TryFromIntError;

fn try_from(val: u128) -> Result<Self, TryFromIntError> {
if val <= MAX_SAFE_UINT as u128 {
if val <= u128::from(MAX_SAFE_UINT) {
Ok(Self(val as i64))
} else {
Err(TryFromIntError::new())
Expand Down Expand Up @@ -1369,7 +1369,7 @@ impl TryFrom<i128> for UInt {
type Error = TryFromIntError;

fn try_from(val: i128) -> Result<Self, TryFromIntError> {
if val >= 0 && val <= MAX_SAFE_INT as i128 {
if val >= 0 && val <= i128::from(MAX_SAFE_INT) {
Ok(Self(val as u64))
} else {
Err(TryFromIntError::new())
Expand Down

0 comments on commit 41bbfab

Please sign in to comment.