@@ -19,7 +19,7 @@ use crate::expr::{Expression, ExpressionView, VTable};
1919/// # Type Parameters
2020/// * `V` - The VTable type this rule applies to. The rule will only be invoked for expressions
2121/// with this vtable type, providing compile-time type safety.
22- pub trait ReduceRule < V : VTable , C : Context > : Send + Sync {
22+ pub trait ReduceRule < V : VTable , C : RewriteContext > : Send + Sync {
2323 /// Try to rewrite an expression.
2424 ///
2525 /// # Arguments
@@ -42,7 +42,7 @@ pub trait ReduceRule<V: VTable, C: Context>: Send + Sync {
4242/// # Type Parameters
4343/// * `V` - The VTable type this rule applies to. The rule will only be invoked for expressions
4444/// with this vtable type, providing compile-time type safety.
45- pub trait ParentReduceRule < V : VTable , C : Context > : Send + Sync {
45+ pub trait ParentReduceRule < V : VTable , C : RewriteContext > : Send + Sync {
4646 /// Try to rewrite an expression based on its parent.
4747 ///
4848 /// # Arguments
@@ -63,13 +63,8 @@ pub trait ParentReduceRule<V: VTable, C: Context>: Send + Sync {
6363 ) -> VortexResult < Option < Expression > > ;
6464}
6565
66- pub trait Context { }
67-
68- // Blanket implementation: all references to Context implementors also implement Context
69- impl < T : Context + ?Sized > Context for & T { }
70-
7166/// Base context for rewrite rules.
72- pub trait RewriteContext : Context { }
67+ pub trait RewriteContext { }
7368
7469// Blanket implementation: all references to RewriteContext implementors also implement RewriteContext
7570impl < T : RewriteContext + ?Sized > RewriteContext for & T { }
@@ -86,8 +81,6 @@ pub trait TypedRewriteContext: RewriteContext {
8681#[ derive( Debug , Default ) ]
8782pub struct EmptyRewriteContext ;
8883
89- impl Context for EmptyRewriteContext { }
90-
9184impl RewriteContext for EmptyRewriteContext { }
9285
9386/// Simple implementation that supports both RewriteContext and TypedRewriteContext.
@@ -96,8 +89,6 @@ pub struct RootRewriteContext<'a> {
9689 pub dtype : & ' a DType ,
9790}
9891
99- impl < ' a > Context for RootRewriteContext < ' a > { }
100-
10192impl < ' a > RewriteContext for RootRewriteContext < ' a > { }
10293
10394impl < ' a > TypedRewriteContext for RootRewriteContext < ' a > {
0 commit comments