mod context; mod picture; mod piece; use context::Context; use picture::Picture; use piece::Piece; fn main() { println!("Hello, world!"); let ctx = Context::new_with_args().unwrap(); let pieces = ctx.get_image_files().unwrap().iter() .map(|file| Picture::new_from_file(&file).unwrap()) .map(|pic| Piece::new(&ctx, pic).unwrap()) .collect::>(); piece::create_index(&ctx, &pieces[..]).unwrap(); }