diff --git a/src/rstd/collections/tree.rs b/src/rstd/collections/tree.rs index 2954276..da54f7c 100644 --- a/src/rstd/collections/tree.rs +++ b/src/rstd/collections/tree.rs @@ -159,11 +159,7 @@ impl<'a, Ctx: Context<'a>, F: Factory<'a, Ctx>> Factory<'a, Ctx> for TreeFactory type ParseError = TreeParseError; fn deserialize(&self, inctx: impl InCtx<'a, Ctx>) -> ParseResult<'a, Ctx, Self> { - let (node, inctx) = self.0.ideserialize(inctx)?; - let height = u64::a_deserialize(inctx)?; - let tree = Tree { node, height }; - tree.validate_height()?; - Ok(tree) + self.ideserialize(inctx).seal() } fn extend(&self, mut mentionable: Self::Mtbl, tail: &[u8]) -> ParseResult<'a, Ctx, Self> {