use ParseModeExt
more
This commit is contained in:
parent
0b0eeae1ec
commit
c99a356491
@ -89,7 +89,7 @@ impl<'a, Ctx: Context<'a>, A: AtomicModeParse> FactoryModeParse<'a, Ctx> for Ato
|
||||
mentionable: ExtensionSourceM<'a, Ctx, Self>,
|
||||
tail: &[u8],
|
||||
) -> ExtensionResultM<'a, Ctx, Self> {
|
||||
<<A as ParseMode>::Mode as Mode>::xbind(
|
||||
Self::xbind(
|
||||
A::ma_extend(Self::smap(mentionable, |a| a.atomic), tail),
|
||||
|a| Ok(a.into()),
|
||||
)
|
||||
|
@ -2,11 +2,11 @@ use super::*;
|
||||
|
||||
impl<A: AtomicModeParse> Atomic for A {
|
||||
fn a_deserialize(inlining: impl Inlining) -> AParseResult<Self> {
|
||||
Self::ma_deserialize(inlining).map(<A::Mode as Mode>::seal)
|
||||
Self::ma_deserialize(inlining).map(Self::seal)
|
||||
}
|
||||
|
||||
fn a_extend(self, tail: &[u8]) -> AParseResult<Self> {
|
||||
<A::Mode as Mode>::xseal(Self::ma_extend(<A::Mode as Mode>::prepare(self), tail))
|
||||
Self::xseal(Self::ma_extend(Self::prepare(self), tail))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -171,11 +171,11 @@ where
|
||||
tail: &[u8],
|
||||
) -> ExtensionResultM<'a, Ctx, Self> {
|
||||
let (_, fb) = SP::factories(&self.factory_data);
|
||||
<Self::Mode as Mode>::xsbind(
|
||||
Self::xsbind(
|
||||
mentionable,
|
||||
|StaticPairObject { pair }| pair.into_elements(),
|
||||
|b| {
|
||||
<Self::Mode as Mode>::xmap_err(fb.mextend(b, tail), |e| {
|
||||
Self::xmap_err(fb.mextend(b, tail), |e| {
|
||||
SP::from_error_b(&self.factory_data, e)
|
||||
})
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user