From c2a69bd3849a857631a13cd9fc3d6fa7560af78c Mon Sep 17 00:00:00 2001 From: timofey Date: Sat, 29 Jul 2023 10:44:50 +0000 Subject: [PATCH] `ExternalPoints` blanket `impl` --- src/rstd/collections/stack.rs | 15 --------------- src/rstd/external_points.rs | 11 +++++++++++ 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/src/rstd/collections/stack.rs b/src/rstd/collections/stack.rs index 51e7dd0..e009f60 100644 --- a/src/rstd/collections/stack.rs +++ b/src/rstd/collections/stack.rs @@ -49,21 +49,6 @@ impl< { } -impl<'a, Ctx: Context<'a>, A: Mentionable<'a, Ctx>> ExternalPoints<'a, Ctx, Stack<'a, Ctx, Self>> - for A -where - as WithParseMode>::WithMode: - ExternalPointsProxy<'a, Ctx, Stack<'a, Ctx, A>, F = Fctr<'a, Ctx, A>>, -{ - fn ex_points_typed( - mentionable: &Stack<'a, Ctx, Self>, - points: &mut impl PointsVisitor<'a, Ctx>, - ) { - type Wm<'a, Ctx, A> = as WithParseMode>::WithMode; - as ExternalPointsProxy<'a, Ctx, _>>::exp_points_typed(mentionable, points) - } -} - impl<'a, Ctx: Context<'a>, F: RegularFactory<'a, Ctx>> ExternalPointsProxy<'a, Ctx, Stack<'a, Ctx, Mtbl<'a, Ctx, F>>> for WithMode where diff --git a/src/rstd/external_points.rs b/src/rstd/external_points.rs index 99ca20d..57b6ca0 100644 --- a/src/rstd/external_points.rs +++ b/src/rstd/external_points.rs @@ -10,3 +10,14 @@ where { fn exp_points_typed(mentionable: &T, points: &mut impl PointsVisitor<'a, Ctx>); } + +impl<'a, Ctx: Context<'a>, A: Mentionable<'a, Ctx>, T> ExternalPoints<'a, Ctx, T> for A +where + as WithParseMode>::WithMode: + ExternalPointsProxy<'a, Ctx, T, F = Fctr<'a, Ctx, A>>, +{ + fn ex_points_typed(mentionable: &T, points: &mut impl PointsVisitor<'a, Ctx>) { + type Wm<'a, Ctx, A> = as WithParseMode>::WithMode; + as ExternalPointsProxy<'a, Ctx, _>>::exp_points_typed(mentionable, points) + } +}