type-neutral mdeserialize_sp
This commit is contained in:
parent
c7d69b9982
commit
4adb021a14
@ -176,7 +176,7 @@ where
|
||||
pub fn mdeserialize_sp<I: InCtx<'a, Ctx>>(
|
||||
factory_data: &SP::FactoryData,
|
||||
inctx: I,
|
||||
) -> ModeResultM<'a, Ctx, Self, I> {
|
||||
) -> ModeResultP<Self, SP, <Self as FactoryBase<'a, Ctx>>::ParseError, I> {
|
||||
let (fa, fb) = SP::factories(factory_data);
|
||||
let (a, inctx) = fa
|
||||
.ideserialize(inctx)
|
||||
@ -184,7 +184,7 @@ where
|
||||
Self::bind(
|
||||
fb.mdeserialize(inctx)
|
||||
.map_err(|e| SP::from_error_b(factory_data, e))?,
|
||||
|b| SP::from_parsed(factory_data, a, b).map(|pair| StaticPairObject { pair }),
|
||||
|b| SP::from_parsed(factory_data, a, b),
|
||||
)
|
||||
}
|
||||
}
|
||||
@ -195,7 +195,10 @@ where
|
||||
SP::FB: FactoryModeParse<'a, Ctx>,
|
||||
{
|
||||
fn mdeserialize<I: InCtx<'a, Ctx>>(&self, inctx: I) -> ModeResultM<'a, Ctx, Self, I> {
|
||||
Self::mdeserialize_sp(&self.factory_data, inctx)
|
||||
Ok(Self::map(
|
||||
Self::mdeserialize_sp(&self.factory_data, inctx)?,
|
||||
|pair| StaticPairObject { pair },
|
||||
))
|
||||
}
|
||||
|
||||
fn mextend(
|
||||
|
Loading…
Reference in New Issue
Block a user