mirror of
https://github.com/edera-dev/sprout.git
synced 2026-11-04 22:02:20 +00:00
chore(sprout): implement iterator stamping to cleanup code
This commit is contained in:
7 files changed
+30
-27
No files matched your search
@@ -22,11 +22,10 @@ pub fn generate(
|
||||
|
||||
// Stamp the entry title and actions from the template.
|
||||
let mut entry = list.entry.clone();
|
||||
entry.actions = entry
|
||||
.actions
|
||||
.into_iter()
|
||||
.map(|action| context.stamp(action))
|
||||
.collect();
|
||||
|
||||
// Stamp all the actions this entry references.
|
||||
entry.actions = context.stamp_iter(entry.actions.into_iter()).collect();
|
||||
|
||||
// Push the entry into the list with the new context.
|
||||
entries.push(BootableEntry::new(
|
||||
index.to_string(),
|
||||
|
||||
Reference in new issue
Block a user