Cargo formatting
This commit is contained in:
@@ -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(())
|
||||
|
||||
Reference in New Issue
Block a user