use oxyroot::RootFile; fn main() { let tree = RootFile::open("o.root").unwrap().get_tree("T").unwrap(); // read large_file.root's "kin" tree let e_beam_iter = tree.branch("v_i").unwrap().as_iter::().unwrap(); // this is fine let data: Vec = e_beam_iter.collect(); // this fails // println!("{:?}", data); let sum: f32 = data.iter().sum(); println!("{}", sum / data.len() as f32); }