Merge pull request #1200 from dtolnay/from128

Delete unreachable branch from Number::from_i128
This commit is contained in:
David Tolnay 2024-10-18 08:17:51 -07:00 committed by GitHub
commit 22973d2783
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -330,19 +330,6 @@ impl Number {
} }
Err(_) => match i64::try_from(i) { Err(_) => match i64::try_from(i) {
Ok(i) => { Ok(i) => {
if i >= 0 {
let n = {
#[cfg(not(feature = "arbitrary_precision"))]
{
N::PosInt(i as u64)
}
#[cfg(feature = "arbitrary_precision")]
{
i.to_string()
}
};
Some(Number { n })
} else {
let n = { let n = {
#[cfg(not(feature = "arbitrary_precision"))] #[cfg(not(feature = "arbitrary_precision"))]
{ {
@ -355,7 +342,6 @@ impl Number {
}; };
Some(Number { n }) Some(Number { n })
} }
}
Err(_) => None, Err(_) => None,
}, },
} }