Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
neunenak committed Nov 2, 2024
1 parent 0716e62 commit aca47c7
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions src/recipe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand Down

0 comments on commit aca47c7

Please sign in to comment.