Running into borrow issue on intermediate.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
use super::macros::iitem;
|
||||
use super::macros::iselector;
|
||||
use super::registry::Registry;
|
||||
use super::IHeading;
|
||||
@@ -15,13 +16,19 @@ iselector!(
|
||||
IDocumentElement,
|
||||
DocumentElement,
|
||||
|registry, original| async {
|
||||
match &original {
|
||||
organic::types::DocumentElement::Heading(inner) => Ok(IDocumentElement::Heading(
|
||||
IHeading::new(registry, inner).await?,
|
||||
)),
|
||||
organic::types::DocumentElement::Section(inner) => Ok(IDocumentElement::Section(
|
||||
ISection::new(registry, inner).await?,
|
||||
)),
|
||||
}
|
||||
iitem!(
|
||||
registry,
|
||||
original,
|
||||
(
|
||||
organic::types::DocumentElement::Heading,
|
||||
IDocumentElement::Heading,
|
||||
IHeading
|
||||
),
|
||||
(
|
||||
organic::types::DocumentElement::Section,
|
||||
IDocumentElement::Section,
|
||||
ISection
|
||||
),
|
||||
)
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user