diff --git a/src/rstd/collections/stack.rs b/src/rstd/collections/stack.rs index 63cfdd6..51e7dd0 100644 --- a/src/rstd/collections/stack.rs +++ b/src/rstd/collections/stack.rs @@ -6,7 +6,7 @@ use crate::rstd::external_points::*; use crate::rstd::{inlining::*, nullable::*, point::*, *}; /// Node containing a (nullable) reference to the next node and an element. -pub struct StackNode<'a, Ctx: Context<'a>, A: StackCompatible<'a, Ctx>> { +pub struct StackNode<'a, Ctx: Context<'a>, A: MentionableBase<'a, Ctx>> { /// Reference comes first due to being inlineable. pub rest: Stack<'a, Ctx, A>, /// Unlike the original implementation in Python, doesn't default to using Point. @@ -29,7 +29,7 @@ impl StackNodeFactory { } } -impl<'a, Ctx: Context<'a>, A: StackCompatible<'a, Ctx>> Serializable for StackNode<'a, Ctx, A> { +impl<'a, Ctx: Context<'a>, A: MentionableBase<'a, Ctx>> Serializable for StackNode<'a, Ctx, A> { fn serialize(&self, serializer: &mut dyn Serializer) { self.rest.serialize(serializer); self.element.serialize(serializer); @@ -90,7 +90,7 @@ where } } -impl<'a, Ctx: Context<'a>, A: StackCompatible<'a, Ctx>> MentionableBase<'a, Ctx> +impl<'a, Ctx: Context<'a>, A: MentionableBase<'a, Ctx>> MentionableBase<'a, Ctx> for StackNode<'a, Ctx, A> { type Fctr = StackNodeFactory; @@ -148,10 +148,7 @@ impl StackNodeFactory { } } -impl<'a, Ctx: Context<'a>, F: Factory<'a, Ctx>> FactoryBase<'a, Ctx> for StackNodeFactory -where - F::Mtbl: StackCompatible<'a, Ctx>, -{ +impl<'a, Ctx: Context<'a>, F: FactoryBase<'a, Ctx>> FactoryBase<'a, Ctx> for StackNodeFactory { type Mtbl = StackNode<'a, Ctx, F::Mtbl>; type ParseError = StackParseError>;