Add intermediate lifetime.
This commit is contained in:
@@ -9,13 +9,13 @@ pub(crate) struct IParagraph {
|
||||
}
|
||||
|
||||
impl IParagraph {
|
||||
pub(crate) async fn new<'parse>(
|
||||
registry: &mut Registry<'parse>,
|
||||
paragraph: &organic::types::Paragraph<'parse>,
|
||||
pub(crate) async fn new<'intermediate, 'parse>(
|
||||
registry: &mut Registry<'intermediate, 'parse>,
|
||||
original: &'intermediate organic::types::Paragraph<'parse>,
|
||||
) -> Result<IParagraph, CustomError> {
|
||||
let children = {
|
||||
let mut ret = Vec::new();
|
||||
for obj in paragraph.children.iter() {
|
||||
for obj in original.children.iter() {
|
||||
ret.push(IObject::new(registry, obj).await?);
|
||||
}
|
||||
ret
|
||||
|
||||
Reference in New Issue
Block a user