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

@@ -8,7 +8,7 @@ macro_rules! inoop {
impl $istruct {
pub(crate) async fn new<'reg, 'orig, 'parse>(
registry: &'reg mut Registry<'orig, 'parse>,
registry: crate::intermediate::RefRegistry<'orig, 'parse>,
original: &'orig organic::types::$pstruct<'parse>,
) -> Result<$istruct, CustomError> {
Ok($istruct {})
@@ -25,8 +25,8 @@ pub(crate) use inoop;
macro_rules! intermediate {
($istruct:ident, $pstruct:ident, $original:ident, $registry:ident, $fnbody:tt) => {
impl $istruct {
pub(crate) async fn new<'reg, 'orig, 'parse>(
registry: &'reg mut Registry<'orig, 'parse>,
pub(crate) async fn new<'orig, 'parse>(
registry: crate::intermediate::RefRegistry<'orig, 'parse>,
original: &'orig organic::types::$pstruct<'parse>,
) -> Result<$istruct, CustomError> {
let $original = original;
@@ -45,10 +45,10 @@ pub(crate) use intermediate;
macro_rules! iselector {
($istruct:ident, $pstruct:ident, $original:ident, $registry:ident, $fnbody:tt) => {
impl $istruct {
pub(crate) fn new<'reg: 'orig, 'orig, 'parse, 'inp: 'reg + 'orig>(
registry: &'reg mut Registry<'orig, 'parse>,
pub(crate) fn new<'orig, 'parse>(
registry: crate::intermediate::RefRegistry<'orig, 'parse>,
original: &'orig organic::types::$pstruct<'parse>,
) -> BoxFuture<'inp, Result<$istruct, CustomError>> {
) -> BoxFuture<'orig, Result<$istruct, CustomError>> {
let $registry = registry;
let $original = original;
async move { $fnbody }.boxed()
@@ -64,7 +64,7 @@ macro_rules! iitem {
match $original {
$(
$penum(inner) => Ok($ienum(
$istruct::new($registry, inner).await?,
$istruct::new($registry.clone(), inner).await?,
)),
)*
}