Fix deserialization by giving type annotations.
This commit is contained in:
parent
7339d6cb9a
commit
20360ebccf
|
@ -601,7 +601,7 @@ impl<T> serde::Deserialize for Ratio<T>
|
|||
fn deserialize<D>(deserializer: &mut D) -> Result<Self, D::Error>
|
||||
where D: serde::Deserializer
|
||||
{
|
||||
let (numer, denom) = try!(serde::Deserialize::deserialize(deserializer));
|
||||
let (numer, denom): (T,T) = try!(serde::Deserialize::deserialize(deserializer));
|
||||
if denom.is_zero() {
|
||||
Err(serde::de::Error::invalid_value("denominator is zero"))
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue