don't try to do an Any trampoline for Expr

This commit is contained in:
Anand Balakrishnan 2023-09-29 13:59:16 -07:00
parent b2e56594b0
commit 7c81b30a8f

View file

@ -1,5 +1,3 @@
use std::any::Any;
use enum_dispatch::enum_dispatch; use enum_dispatch::enum_dispatch;
use super::{BoolExpr, ExprRef, NumExpr}; use super::{BoolExpr, ExprRef, NumExpr};
@ -16,9 +14,6 @@ pub trait Expr {
/// If the expression doesn't contain arguments (i.e., it is a leaf expression) then /// If the expression doesn't contain arguments (i.e., it is a leaf expression) then
/// the vector is empty. /// the vector is empty.
fn args(&self) -> Vec<ExprRef<'_>>; fn args(&self) -> Vec<ExprRef<'_>>;
/// [`std::any::Any`] trampoline for expressions
fn as_any(&self) -> &dyn Any;
} }
/// Marker trait for numeric expressions /// Marker trait for numeric expressions