Skip to content

Commit 6bff9de

Browse files
author
Jorge Aparicio
committed
serialize: fix fallout
1 parent f3333d5 commit 6bff9de

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/libserialize/json.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1324,7 +1324,9 @@ pub struct Parser<T> {
13241324
state: ParserState,
13251325
}
13261326

1327-
impl<T: Iterator<char>> Iterator<JsonEvent> for Parser<T> {
1327+
impl<T: Iterator<Item=char>> Iterator for Parser<T> {
1328+
type Item = JsonEvent;
1329+
13281330
fn next(&mut self) -> Option<JsonEvent> {
13291331
if self.state == ParseFinished {
13301332
return None;
@@ -1345,7 +1347,7 @@ impl<T: Iterator<char>> Iterator<JsonEvent> for Parser<T> {
13451347
}
13461348
}
13471349

1348-
impl<T: Iterator<char>> Parser<T> {
1350+
impl<T: Iterator<Item=char>> Parser<T> {
13491351
/// Creates the JSON parser.
13501352
pub fn new(rdr: T) -> Parser<T> {
13511353
let mut p = Parser {
@@ -1867,7 +1869,7 @@ pub struct Builder<T> {
18671869
token: Option<JsonEvent>,
18681870
}
18691871

1870-
impl<T: Iterator<char>> Builder<T> {
1872+
impl<T: Iterator<Item=char>> Builder<T> {
18711873
/// Create a JSON Builder.
18721874
pub fn new(src: T) -> Builder<T> {
18731875
Builder { parser: Parser::new(src), token: None, }

src/libserialize/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Core encoding and decoding interfaces.
2525
#![allow(unknown_features)]
2626
#![feature(macro_rules, default_type_params, phase, slicing_syntax, globs)]
2727
#![feature(unboxed_closures)]
28+
#![feature(associated_types)]
2829

2930
// test harness access
3031
#[cfg(test)]

0 commit comments

Comments
 (0)