Skip to content

Commit d1a83e6

Browse files
committed
std: add Encoder::emit_map and Decoder::read_map
1 parent ed62f6d commit d1a83e6

File tree

6 files changed

+263
-103
lines changed

6 files changed

+263
-103
lines changed

src/libstd/ebml.rs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,21 @@ pub mod reader {
402402
}
403403
}
404404
}
405+
406+
fn read_map<T>(&self, _f: &fn(uint) -> T) -> T {
407+
debug!("read_map()");
408+
fail!(~"read_map is unimplemented");
409+
}
410+
411+
fn read_map_elt_key<T>(&self, idx: uint, _f: &fn() -> T) -> T {
412+
debug!("read_map_elt_key(idx=%u)", idx);
413+
fail!(~"read_map_elt_val is unimplemented");
414+
}
415+
416+
fn read_map_elt_val<T>(&self, idx: uint, _f: &fn() -> T) -> T {
417+
debug!("read_map_elt_val(idx=%u)", idx);
418+
fail!(~"read_map_elt_val is unimplemented");
419+
}
405420
}
406421
}
407422
@@ -654,6 +669,18 @@ pub mod writer {
654669
fn emit_option_some(&self, f: &fn()) {
655670
self.emit_enum_variant("Some", 1, 1, f)
656671
}
672+
673+
fn emit_map(&self, _len: uint, _f: &fn()) {
674+
fail!(~"emit_map is unimplemented");
675+
}
676+
677+
fn emit_map_elt_key(&self, _idx: uint, _f: &fn()) {
678+
fail!(~"emit_map_elt_key is unimplemented");
679+
}
680+
681+
fn emit_map_elt_val(&self, _idx: uint, _f: &fn()) {
682+
fail!(~"emit_map_elt_val is unimplemented");
683+
}
657684
}
658685
}
659686

src/libstd/flatpipes.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,8 +466,8 @@ pub mod flatteners {
466466
fn from_writer(w: @Writer) -> Self;
467467
}
468468
469-
impl<'self> FromReader for json::Decoder<'self> {
470-
fn from_reader(r: @Reader) -> json::Decoder<'self> {
469+
impl FromReader for json::Decoder {
470+
fn from_reader(r: @Reader) -> json::Decoder {
471471
match json::from_reader(r) {
472472
Ok(json) => {
473473
json::Decoder(json)

0 commit comments

Comments
 (0)