diff src/th06/anm0_vm.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 598f3125cbac
children 6d4802abe134
line wrap: on
line diff
--- a/src/th06/anm0_vm.rs
+++ b/src/th06/anm0_vm.rs
@@ -444,7 +444,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();
         assert_eq!(anm0.size, (256, 256));
         assert_eq!(anm0.format, 5);
         let sprite = Rc::new(RefCell::new(Sprite::new()));