diff src/th06/enemy.rs @ 701:b6c351ca0a35

anm0: return the nom IResult and the list of Anm0s.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Fri, 23 Aug 2019 15:34:03 +0200
parents 2a60f12bd5bd
children 81232dac8136
line wrap: on
line diff
--- a/src/th06/enemy.rs
+++ b/src/th06/enemy.rs
@@ -501,7 +501,8 @@ mod tests {
         let mut file = io::BufReader::new(file);
         let mut buf = vec![];
         file.read_to_end(&mut buf).unwrap();
-        let anm0 = Anm0::from_slice(&buf).unwrap();
+        let (_, mut anms) = Anm0::from_slice(&buf).unwrap();
+        let anm0 = anms.pop().unwrap();
         let anm0 = Rc::new(RefCell::new(anm0));
         let prng = Rc::new(RefCell::new(Prng::new(0)));
         let game = Game::new(prng, Rank::Easy);