Cargo formatting

This commit is contained in:
Cameron
2025-12-17 22:10:03 -05:00
parent d61fcb942a
commit e4d988a9fd
4 changed files with 109 additions and 85 deletions

View File

@@ -2,11 +2,11 @@ use std::path::PathBuf;
use std::sync::{Arc, Mutex};
use chrono::Utc;
use walkdir::WalkDir;
use rayon::prelude::*;
use walkdir::WalkDir;
use image_api::database::{ExifDao, SqliteExifDao};
use image_api::database::models::InsertImageExif;
use image_api::database::{ExifDao, SqliteExifDao};
use image_api::exif;
fn main() -> anyhow::Result<()> {
@@ -51,7 +51,10 @@ fn main() -> anyhow::Result<()> {
let relative_path = match path.strip_prefix(&base) {
Ok(p) => p.to_str().unwrap().to_string(),
Err(_) => {
eprintln!("Error: Could not create relative path for {}", path.display());
eprintln!(
"Error: Could not create relative path for {}",
path.display()
);
return Err(anyhow::anyhow!("Path error"));
}
};
@@ -110,10 +113,17 @@ fn main() -> anyhow::Result<()> {
println!();
println!("===================");
println!("Migration complete!");
println!("Successfully extracted EXIF from {}/{} images", success_count, image_files.len());
println!(
"Successfully extracted EXIF from {}/{} images",
success_count,
image_files.len()
);
if error_count > 0 {
println!("{} images had no EXIF data or encountered errors", error_count);
println!(
"{} images had no EXIF data or encountered errors",
error_count
);
}
Ok(())