]> git.lizzy.rs Git - rust.git/commitdiff
serialize: fix fallout
authorJorge Aparicio <japaricious@gmail.com>
Fri, 2 Jan 2015 03:45:11 +0000 (22:45 -0500)
committerJorge Aparicio <japaricious@gmail.com>
Sat, 3 Jan 2015 14:34:04 +0000 (09:34 -0500)
src/libserialize/json.rs
src/libserialize/lib.rs

index a87044bb3b3ba02e9ebe7902ea3ebd0bb1447ec8..83badb0c57c82f8928ebd20f7de803849209892a 100644 (file)
@@ -1324,7 +1324,9 @@ pub struct Parser<T> {
     state: ParserState,
 }
 
-impl<T: Iterator<char>> Iterator<JsonEvent> for Parser<T> {
+impl<T: Iterator<Item=char>> Iterator for Parser<T> {
+    type Item = JsonEvent;
+
     fn next(&mut self) -> Option<JsonEvent> {
         if self.state == ParseFinished {
             return None;
@@ -1345,7 +1347,7 @@ fn next(&mut self) -> Option<JsonEvent> {
     }
 }
 
-impl<T: Iterator<char>> Parser<T> {
+impl<T: Iterator<Item=char>> Parser<T> {
     /// Creates the JSON parser.
     pub fn new(rdr: T) -> Parser<T> {
         let mut p = Parser {
@@ -1867,7 +1869,7 @@ pub struct Builder<T> {
     token: Option<JsonEvent>,
 }
 
-impl<T: Iterator<char>> Builder<T> {
+impl<T: Iterator<Item=char>> Builder<T> {
     /// Create a JSON Builder.
     pub fn new(src: T) -> Builder<T> {
         Builder { parser: Parser::new(src), token: None, }
index 4a2bbbeec03a48d26a501e30006e59e8811514d2..1ec6a2af309a7eaa113c96f21ecedf363ccdac14 100644 (file)
@@ -25,6 +25,7 @@
 #![allow(unknown_features)]
 #![feature(macro_rules, default_type_params, phase, slicing_syntax, globs)]
 #![feature(unboxed_closures)]
+#![feature(associated_types)]
 
 // test harness access
 #[cfg(test)]