From 7bad69c14a77f0b8e37de04d0617a04ebe034c68 Mon Sep 17 00:00:00 2001 From: aiongg Date: Fri, 30 Oct 2026 21:33:58 +0000 Subject: [PATCH] Integration: cargo fmt --- crates/engine/src/cmd/find.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/crates/engine/src/cmd/find.rs b/crates/engine/src/cmd/find.rs index 473b2d622..aa6475f26 100644 --- a/crates/engine/src/cmd/find.rs +++ b/crates/engine/src/cmd/find.rs @@ -356,8 +356,11 @@ fn change(s: &mut Session, p: &Value) -> Result { let attrs = p.get("attrs").cloned(); let over = char_overrides(attrs.as_ref())?; // A null attribute clears that override on the found text. - let cleared: Vec = - attrs.as_ref().and_then(Value::as_object).map(|o| o.iter().filter(|(_, v)| v.is_null()).map(|(k, _)| k.clone()).collect()).unwrap_or_default(); + let cleared: Vec = attrs + .as_ref() + .and_then(Value::as_object) + .map(|o| o.iter().filter(|(_, v)| v.is_null()).map(|(k, _)| k.clone()).collect()) + .unwrap_or_default(); super::text::validate_char_fill(&s.doc()?.doc, &over, "find.change")?; let char_style = str_param(p, "charStyle").map(str::to_string); let para_style = str_param(p, "paraStyle").map(str::to_string); @@ -369,7 +372,8 @@ fn change(s: &mut Session, p: &Value) -> Result { return Err(bad("find.change", format!("no paragraph style `{n}`"))); } // InDesign: with a Change Format and nothing in Change to, the found text is only formatted. - let format_only = str_param(p, "change").unwrap_or("").is_empty() && (char_style.is_some() || para_style.is_some() || !over.is_empty() || !cleared.is_empty()); + let format_only = + str_param(p, "change").unwrap_or("").is_empty() && (char_style.is_some() || para_style.is_some() || !over.is_empty() || !cleared.is_empty()); let targets = scope(s, p)?.targets; s.edit(|d, sel| { let styles = d.styles.clone();