Populating document's children.
This commit is contained in:
@@ -33,16 +33,34 @@ to_wasm!(
|
||||
})
|
||||
.collect();
|
||||
|
||||
let children = original
|
||||
.zeroth_section
|
||||
.iter()
|
||||
.map(|child| {
|
||||
child
|
||||
.to_wasm(wasm_context.clone())
|
||||
.map(Into::<WasmAstNode<'_>>::into)
|
||||
})
|
||||
.chain(original.children.iter().map(|child| {
|
||||
child
|
||||
.to_wasm(wasm_context.clone())
|
||||
.map(Into::<WasmAstNode<'_>>::into)
|
||||
}))
|
||||
.collect::<Result<Vec<_>, _>>()?;
|
||||
// let children = original
|
||||
// .children
|
||||
// .iter()
|
||||
// .map(|child| child.to_wasm(wasm_context.clone()))
|
||||
// .map(|child| {
|
||||
// child
|
||||
// .to_wasm(wasm_context.clone())
|
||||
// .map(Into::<WasmAstNode<'_>>::into)
|
||||
// })
|
||||
// .collect::<Result<Vec<_>, _>>()?;
|
||||
|
||||
Ok(WasmDocument {
|
||||
standard_properties,
|
||||
additional_properties,
|
||||
children: Vec::new(),
|
||||
children,
|
||||
})
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user