From 442908b2a9df7aaf5ca7376e15261bc4aa84903d Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 9 Oct 2026 05:08:01 +0000 Subject: [PATCH] fmt: rustfmt the #1547 save path and test Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01UHgFEHEsefoQoBParH47JA --- crates/automation/src/headless.rs | 5 ++--- crates/automation/tests/layered_save_dirty.rs | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/crates/automation/src/headless.rs b/crates/automation/src/headless.rs index 736c4d2901e..51b0a9bc9b3 100644 --- a/crates/automation/src/headless.rs +++ b/crates/automation/src/headless.rs @@ -146,9 +146,8 @@ impl Headless { // record the current revision as saved so the session stops reporting `dirty`, and make // the file the document's path. A flat export (PNG, JPEG, …) is a copy and leaves both // alone (#1547). - let ext = format - .map(|f| f.trim_start_matches('.').to_ascii_lowercase()) - .or_else(|| target.extension().map(|e| e.to_string_lossy().to_ascii_lowercase())); + let ext = + format.map(|f| f.trim_start_matches('.').to_ascii_lowercase()).or_else(|| target.extension().map(|e| e.to_string_lossy().to_ascii_lowercase())); let layered = matches!(ext.as_deref(), Some("psd" | "psb")) || ext.as_deref() == Some(photocraft_format::EXTENSION); if layered { // Saving by index must not retarget the next automation command. diff --git a/crates/automation/tests/layered_save_dirty.rs b/crates/automation/tests/layered_save_dirty.rs index 0a19277f40c..731a52e850f 100644 --- a/crates/automation/tests/layered_save_dirty.rs +++ b/crates/automation/tests/layered_save_dirty.rs @@ -79,4 +79,4 @@ fn a_flat_export_is_a_copy_and_leaves_the_document_dirty() { headless.handle("doc.save", json!({})).unwrap(); assert!(!headless.session.active().unwrap().is_dirty()); std::fs::remove_dir_all(dir).unwrap(); -} \ No newline at end of file +}