From 47b5e0ae1b9f7c4997bb44adad3f7a73be08baa9 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 11 Oct 2026 12:32:03 +0000 Subject: [PATCH] Batch 30: cargo fmt over the merged PRs Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01BKWB9TCnvzJHV6xMLAj2J4 --- crates/engine/src/smart.rs | 8 +++++--- crates/ui-egui/src/panels/right.rs | 15 +++++---------- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/crates/engine/src/smart.rs b/crates/engine/src/smart.rs index b607d84d82..3628f188ce 100644 --- a/crates/engine/src/smart.rs +++ b/crates/engine/src/smart.rs @@ -202,9 +202,11 @@ pub fn migrate(from: &Path, to: &Path, what: Existing) -> (usize, Vec) { } for src in files(from) { let Some(name) = src.file_name() else { continue }; - let dst = name.to_str().and_then(|n| n.strip_suffix(".lcsp")).filter(|stem| { - stem.len() == 32 && stem.bytes().all(|b| b.is_ascii_hexdigit() && !b.is_ascii_uppercase()) - }).map_or_else(|| to.join(name), |stem| to.join(&stem[..2]).join(name)); + let dst = name + .to_str() + .and_then(|n| n.strip_suffix(".lcsp")) + .filter(|stem| stem.len() == 32 && stem.bytes().all(|b| b.is_ascii_hexdigit() && !b.is_ascii_uppercase())) + .map_or_else(|| to.join(name), |stem| to.join(&stem[..2]).join(name)); let r = match what { Existing::Discard => std::fs::remove_file(&src), _ => { diff --git a/crates/ui-egui/src/panels/right.rs b/crates/ui-egui/src/panels/right.rs index 5bd4f98d0a..501a78c5e9 100644 --- a/crates/ui-egui/src/panels/right.rs +++ b/crates/ui-egui/src/panels/right.rs @@ -694,16 +694,11 @@ fn info(app: &mut LightcraftApp, ui: &mut egui::Ui, id: PhotoId) { if let lightcraft_catalog::Source::File { path } = &p.source { let avail = &app.session.media.availability; let online = !avail.is_offline(path); - let smart = app - .session - .media - .smart_dir - .as_ref() - .is_some_and(|d| { - let shard = lightcraft_engine::smart::sharded_file_path(d, &p); - let legacy = d.join(lightcraft_engine::smart::file_name(&p)); - avail.exists(&shard.to_string_lossy()) == Some(true) || avail.exists(&legacy.to_string_lossy()) == Some(true) - }); + let smart = app.session.media.smart_dir.as_ref().is_some_and(|d| { + let shard = lightcraft_engine::smart::sharded_file_path(d, &p); + let legacy = d.join(lightcraft_engine::smart::file_name(&p)); + avail.exists(&shard.to_string_lossy()) == Some(true) || avail.exists(&legacy.to_string_lossy()) == Some(true) + }); if !online || smart { let text = match (online, smart) { (false, true) => "Original offline ยท editing the smart preview",