From 49e7d09ea23e3c209f98cfc336ed030d2b6bccac Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Fri, 13 Nov 2026 09:22:09 -0500 Subject: [PATCH] Fix singleton loop Clippy warnings in IDML preferences --- crates/idml/src/model/preferences.rs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/crates/idml/src/model/preferences.rs b/crates/idml/src/model/preferences.rs index 2f33caf7e..b32317cbd 100644 --- a/crates/idml/src/model/preferences.rs +++ b/crates/idml/src/model/preferences.rs @@ -56,10 +56,8 @@ impl DocumentPreferences { } } attrs.push(("PagesPerDocument".into(), "1".into())); - for (key, value) in [("FacingPages", self.facing_pages)] { - if let Some(value) = value { - attrs.push((key.into(), if value { "true" } else { "false" }.into())); - } + if let Some(value) = self.facing_pages { + attrs.push(("FacingPages".into(), if value { "true" } else { "false" }.into())); } for (key, value) in [ ("DocumentBleedTopOffset", self.bleed[0]), @@ -102,10 +100,8 @@ impl DocumentPreferences { attrs.push(("PageBinding".into(), value.clone())); } attrs.push(("ColumnDirection".into(), "Horizontal".into())); - for (key, value) in [("Intent", &self.intent)] { - if let Some(value) = value { - attrs.push((key.into(), value.clone())); - } + if let Some(value) = &self.intent { + attrs.push(("Intent".into(), value.clone())); } if let Some(value) = self.primary_text_frame { attrs.push(("CreatePrimaryTextFrame".into(), bool_string(value)));