From 20360ebccf547f4197291f9abf7aeb101db97850 Mon Sep 17 00:00:00 2001 From: Richard Janis Goldschmidt Date: Tue, 16 Aug 2016 00:46:49 +0200 Subject: [PATCH] Fix deserialization by giving type annotations. --- rational/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rational/src/lib.rs b/rational/src/lib.rs index 07f780b..dec7400 100644 --- a/rational/src/lib.rs +++ b/rational/src/lib.rs @@ -601,7 +601,7 @@ impl serde::Deserialize for Ratio fn deserialize(deserializer: &mut D) -> Result 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 {