summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/main.rs b/src/main.rs
index 28fe0c9..b647cdc 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -11,13 +11,11 @@ fn main() {
let ctx = Context::new_with_args().unwrap();
- for file in ctx.get_image_files().unwrap() {
- println!("{}", file.display());
+ let pieces = ctx.get_image_files().unwrap().iter()
+ .map(|file| Picture::new_from_file(&file).unwrap())
+ .map(|pic| Piece::new(&ctx, pic).unwrap())
+ .collect::<Vec<Piece>>();
- let pic = Picture::new_from_file(&file).unwrap();
- println!("{:?}", pic);
+ piece::create_index(&ctx, &pieces[..]).unwrap();
- let piece = Piece::new(&ctx, pic).unwrap();
- println!("{:?}", piece);
- }
}