File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed
branches/snap-stage3/src/libstd Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change 1
1
---
2
2
refs/heads/master: 5f13e9ccc2e3328d4cd8ca49f84e6840dd998346
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
- refs/heads/snap-stage3: 31563f53d9237c21423533c16a15c37b10a6f418
4
+ refs/heads/snap-stage3: bdef3f193052de51dbdc948d1c141a6615dcfd28
5
5
refs/heads/try: 8eb2bab100b42f0ba751552d8eff00eb2134c55a
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
Original file line number Diff line number Diff line change @@ -855,9 +855,7 @@ impl serialize::Decoder for Decoder {
855
855
}
856
856
_ => fail!(~" not a list"),
857
857
};
858
- let res = f(len);
859
- self.stack.pop();
860
- res
858
+ f(len)
861
859
}
862
860
863
861
fn read_seq_elt<T>(&self, idx: uint, f: &fn() -> T) -> T {
@@ -1675,10 +1673,10 @@ mod tests {
1675
1673
fn test_read_map() {
1676
1674
let s = ~" { \" a\" : \"Dog \" , \"b\" : [ \" Frog \" , \"Henry \" , 349 ] } ";
1677
1675
let decoder = Decoder(from_str(s).unwrap());
1678
- let map: LinearMap<~str, Animal> = Decodable::decode(&decoder);
1676
+ let mut map: LinearMap<~str, Animal> = Decodable::decode(&decoder);
1679
1677
1680
- assert_eq!(map.find (&~" a"), Some(Dog));
1681
- assert_eq!(map.find (&~" b"), Some(Frog(~" Henry ", 349)));
1678
+ assert_eq!(map.pop (&~" a"), Some(Dog));
1679
+ assert_eq!(map.pop (&~" b"), Some(Frog(~" Henry ", 349)));
1682
1680
}
1683
1681
1684
1682
#[test]
You can’t perform that action at this time.
0 commit comments