From 9871c685b4a56bf5850b76787313eaeb0d7208d8 Mon Sep 17 00:00:00 2001 From: Cameron Cordes Date: Sat, 9 May 2026 21:23:11 -0400 Subject: [PATCH] date-override: cargo fmt Co-Authored-By: Claude Opus 4.7 (1M context) --- src/database/mod.rs | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/src/database/mod.rs b/src/database/mod.rs index 47d5871..049f8ac 100644 --- a/src/database/mod.rs +++ b/src/database/mod.rs @@ -752,9 +752,7 @@ fn locate_image_exif_row( .filter(rel_path.eq(&normalized).or(rel_path.eq(&windows_form))) .first::(connection) .map_err(|e| match e { - diesel::result::Error::NotFound => { - anyhow::Error::msg("row_not_found") - } + diesel::result::Error::NotFound => anyhow::Error::msg("row_not_found"), other => anyhow::Error::from(other).context("lookup_failed"), }) } @@ -1322,11 +1320,8 @@ impl ExifDao for SqliteExifDao { // Read-modify-write under the dao mutex so the snapshot is // consistent with the value being overwritten. The mutex holds // for the duration of this closure — no other writer can race. - let current = locate_image_exif_row( - connection.deref_mut(), - library_id_val, - rel_path_val, - )?; + let current = + locate_image_exif_row(connection.deref_mut(), library_id_val, rel_path_val)?; // Snapshot only on first override. Subsequent overrides keep // the original snapshot intact so a single revert restores @@ -1380,11 +1375,8 @@ impl ExifDao for SqliteExifDao { let mut connection = self.connection.lock().expect("Unable to get ExifDao"); - let current = locate_image_exif_row( - connection.deref_mut(), - library_id_val, - rel_path_val, - )?; + let current = + locate_image_exif_row(connection.deref_mut(), library_id_val, rel_path_val)?; // No override active — nothing to revert. Return the current // row unchanged so the endpoint is idempotent.