fmt: rustfmt the #1547 save path and test

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01UHgFEHEsefoQoBParH47JA
This commit is contained in:
Claude committed 2026-10-09 05:08:01 +00:00
1 parent db0a01078d
commit 442908b2a9
2 files changed
+3 -4

No files matched your search

+2 -3
View File
@@ -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.
@@ -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();
}
}