File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -855,9 +855,7 @@ impl serialize::Decoder for Decoder {
855855 }
856856 _ => fail!(~" not a list"),
857857 };
858- let res = f(len);
859- self.stack.pop();
860- res
858+ f(len)
861859 }
862860
863861 fn read_seq_elt<T>(&self, idx: uint, f: &fn() -> T) -> T {
@@ -1675,10 +1673,10 @@ mod tests {
16751673 fn test_read_map() {
16761674 let s = ~" { \" a\" : \"Dog \" , \"b\" : [ \" Frog \" , \"Henry \" , 349 ] } ";
16771675 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);
16791677
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)));
16821680 }
16831681
16841682 #[test]
You can’t perform that action at this time.
0 commit comments