comparison examples/eclrenderer.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 ccb739c5b66c
children bca515da9047
comparison
equal deleted inserted replaced
700:ccb739c5b66c 701:b6c351ca0a35
113 let buf = load_file_into_vec(ecl_filename); 113 let buf = load_file_into_vec(ecl_filename);
114 let (_, ecl) = Ecl::from_slice(&buf).unwrap(); 114 let (_, ecl) = Ecl::from_slice(&buf).unwrap();
115 115
116 // Open the ANM file. 116 // Open the ANM file.
117 let buf = load_file_into_vec(anm_filename); 117 let buf = load_file_into_vec(anm_filename);
118 let anm0 = Anm0::from_slice(&buf).unwrap(); 118 let (_, mut anms) = Anm0::from_slice(&buf).unwrap();
119 let anm0 = anms.pop().unwrap();
119 let anm0 = Rc::new(RefCell::new(anm0)); 120 let anm0 = Rc::new(RefCell::new(anm0));
120 121
121 if ecl.subs.len() < sub as usize { 122 if ecl.subs.len() < sub as usize {
122 eprintln!("This ecl doesn’t contain a sub named {}.", sub); 123 eprintln!("This ecl doesn’t contain a sub named {}.", sub);
123 return; 124 return;