diff --git a/serde2/src/json/de.rs b/serde2/src/json/de.rs index c5f1a2bb..f0f96edb 100644 --- a/serde2/src/json/de.rs +++ b/serde2/src/json/de.rs @@ -14,7 +14,9 @@ pub struct Deserializer { buf: Vec, } -impl> Deserializer { +impl Deserializer + where Iter: Iterator, +{ /// Creates the JSON parser. #[inline] pub fn new(rdr: Iter) -> Deserializer { @@ -376,7 +378,9 @@ impl> Deserializer { } } -impl> de::Deserializer for Deserializer { +impl de::Deserializer for Deserializer + where Iter: Iterator, +{ type Error = Error; #[inline] @@ -575,7 +579,9 @@ struct EnumVisitor<'a, Iter: 'a> { de: &'a mut Deserializer, } -impl<'a, Iter: Iterator> de::EnumVisitor for EnumVisitor<'a, Iter> { +impl<'a, Iter> de::EnumVisitor for EnumVisitor<'a, Iter> + where Iter: Iterator, +{ type Error = Error; fn visit_unit(&mut self) -> Result<(), Error> {