From aca47c722940e1691ab4dc66cfd1a700e8f19656 Mon Sep 17 00:00:00 2001 From: Greg Shuflin Date: Fri, 1 Nov 2024 21:24:32 -0700 Subject: [PATCH] fix --- src/recipe.rs | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/recipe.rs b/src/recipe.rs index e2d477bd..3bdb1052 100644 --- a/src/recipe.rs +++ b/src/recipe.rs @@ -389,16 +389,13 @@ impl<'src, D> Recipe<'src, D> { })?; let mut path = tempdir.path().to_path_buf(); - let extension = self - .attributes - .get(AttributeDiscriminant::Extension) - .and_then(|attribute| { - if let Attribute::Extension(extension) = attribute { - Some(extension.cooked.as_str()) - } else { - None - } - }); + let extension = self.attributes.iter().find_map(|attribute| { + if let Attribute::Extension(extension) = attribute { + Some(extension.cooked.as_str()) + } else { + None + } + }); path.push(executor.script_filename(self.name(), extension));