From 8f36bb8cf31cc85aeaf8934ac7cd752f517bf033 Mon Sep 17 00:00:00 2001 From: Ziyang Hu Date: Mon, 30 Oct 2023 22:16:20 +0800 Subject: [PATCH] make `eval_to_const` public https://github.com/cozodb/cozo/issues/162 --- cozo-core/src/data/expr.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cozo-core/src/data/expr.rs b/cozo-core/src/data/expr.rs index a8d25eac..26ab25bb 100644 --- a/cozo-core/src/data/expr.rs +++ b/cozo-core/src/data/expr.rs @@ -396,7 +396,8 @@ impl Expr { } Ok(()) } - pub(crate) fn eval_to_const(mut self) -> Result { + /// Evaluate the expression to a constant value if possible + pub fn eval_to_const(mut self) -> Result { #[derive(Error, Diagnostic, Debug)] #[error("Expression contains unevaluated constant")] #[diagnostic(code(eval::not_constant))]