Auto merge of #299 - dotdash:rational-fix, r=cuviper

Fix building without the num-bigint feature
This commit is contained in:
Homu 2017-06-10 01:54:07 +09:00
commit f809c79d9f
1 changed files with 1 additions and 0 deletions

View File

@ -668,6 +668,7 @@ impl RatioErrorKind {
}
}
#[cfg(feature = "num-bigint")]
impl FromPrimitive for Ratio<BigInt> {
fn from_i64(n: i64) -> Option<Self> {
Some(Ratio::from_integer(n.into()))