cargo fmt

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Brandon Thomas
2026-10-13 05:23:52 -04:00
co-authored by Claude Opus 5.5
parent 6c799f3c3b
commit 91ee7bf1b3
2 changed files with 11 additions and 2 deletions
+7 -1
View File
@@ -386,7 +386,13 @@ type RankPlanes<'a> = [(&'a [f32], &'a [f32])];
/// ranks (the Cryptomatte spec's matte), clamped to 0..1.
#[inline]
fn crypto_matte(planes: &RankPlanes, sel: &[u32], i: usize) -> f32 {
planes.iter().filter_map(|(id, c)| Some((*id.get(i)?, *c.get(i)?))).filter(|(id, c)| *c > 0.0 && sel.contains(&id.to_bits())).map(|(_, c)| c).sum::<f32>().clamp(0.0, 1.0)
planes
.iter()
.filter_map(|(id, c)| Some((*id.get(i)?, *c.get(i)?)))
.filter(|(id, c)| *c > 0.0 && sel.contains(&id.to_bits()))
.map(|(_, c)| c)
.sum::<f32>()
.clamp(0.0, 1.0)
}
/// The coverage-weighted ID colours at aux pixel `i` (the spec's preview).
+4 -1
View File
@@ -226,7 +226,10 @@ pub fn show(app: &mut EffectcraftApp, ctx: &egui::Context, t: &Tokens) {
// Enter is OK, unless it belongs to the rename field, an open preset menu or the delete
// confirmation (where Enter is not Delete). A recorded Enter never gets here: the recorder
// took the frame's key events above.
close |= st.rename.is_none() && st.confirm_delete.is_none() && !egui::Popup::is_any_open(ctx) && ctx.input(|i| i.modifiers.is_none() && i.key_pressed(egui::Key::Enter));
close |= st.rename.is_none()
&& st.confirm_delete.is_none()
&& !egui::Popup::is_any_open(ctx)
&& ctx.input(|i| i.modifiers.is_none() && i.key_pressed(egui::Key::Enter));
// Modifiers: toggles, or the ones held on the keyboard.
let held = ctx.input(|i| i.modifiers);
let held = [held.ctrl && cfg!(target_os = "macos"), held.command, held.alt, held.shift];