Fix build by making the registry guarded by an ArcMutex.

This commit is contained in:
Tom Alexander
2023-10-29 21:19:30 -04:00
parent f63620b547
commit 1f3b5262b8
15 changed files with 113 additions and 90 deletions

View File

@@ -1,7 +1,9 @@
use super::macros::intermediate;
use super::registry::register_footnote_definition;
use super::registry::Registry;
use super::IAstNode;
use crate::error::CustomError;
use crate::intermediate::RefRegistry;
#[derive(Debug, Clone)]
pub(crate) struct IFootnoteDefinition {}
@@ -12,9 +14,7 @@ intermediate!(
original,
registry,
{
registry
.register_footnote_definition(original.label, &original.children)
.await?;
register_footnote_definition(registry, original.label, &original.children).await?;
Ok(IFootnoteDefinition {})
}
);
@@ -26,8 +26,8 @@ pub(crate) struct IRealFootnoteDefinition {
}
impl IRealFootnoteDefinition {
pub(crate) async fn new<'reg, 'orig, 'parse>(
registry: &'reg mut Registry<'orig, 'parse>,
pub(crate) async fn new<'orig, 'parse>(
registry: RefRegistry<'orig, 'parse>,
footnote_id: usize,
contents: Vec<IAstNode>,
) -> Result<IRealFootnoteDefinition, CustomError> {