diff --git a/src/rstd/nullable.rs b/src/rstd/nullable.rs index bd9597e..49835c8 100644 --- a/src/rstd/nullable.rs +++ b/src/rstd/nullable.rs @@ -56,13 +56,7 @@ impl<'a, Ctx: Context<'a>, F: Factory<'a, Ctx>> Factory<'a, Ctx> for NullableFac type ParseError = PointParseError; fn deserialize(&self, inctx: impl InCtx<'a, Ctx>) -> ParseResult<'a, Ctx, Self> { - let factory = self.factory.clone(); - let (address, inctx) = inctx.icnext_address(|slice| PointParseError::from(slice))?; - Ok(if address.point == HASH_ZEROS { - Nullable::Null(factory) - } else { - Nullable::NotNull(Point::from_address(address, factory, inctx.iresolver())) - }) + self.ideserialize(inctx).seal() } fn extend(&self, _mentionable: Self::Mtbl, tail: &[u8]) -> ParseResult<'a, Ctx, Self> {