Standardize the construction of intermediate BlogPostPage.
This commit is contained in:
@@ -8,14 +8,20 @@ pub(crate) struct ISection {
|
||||
pub(crate) children: Vec<IElement>,
|
||||
}
|
||||
|
||||
intermediate!(ISection, Section, original, registry, {
|
||||
let children = {
|
||||
let mut ret = Vec::new();
|
||||
for elem in original.children.iter() {
|
||||
ret.push(IElement::new(registry.clone(), elem).await?);
|
||||
}
|
||||
ret
|
||||
};
|
||||
intermediate!(
|
||||
ISection,
|
||||
&'orig organic::types::Section<'parse>,
|
||||
original,
|
||||
registry,
|
||||
{
|
||||
let children = {
|
||||
let mut ret = Vec::new();
|
||||
for elem in original.children.iter() {
|
||||
ret.push(IElement::new(registry.clone(), elem).await?);
|
||||
}
|
||||
ret
|
||||
};
|
||||
|
||||
Ok(ISection { children })
|
||||
});
|
||||
Ok(ISection { children })
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user