From fdf4464edbb2e92bfbecf732ebae331f20dd8f78 Mon Sep 17 00:00:00 2001 From: ozzy <2+ozzy@noreply.localhost> Date: Sun, 27 Sep 2026 14:26:55 -0500 Subject: [PATCH] refactor(eval): rename math_constants to constants --- src/math/{math_constants.rs => constants.rs} | 0 src/math/eval.rs | 4 ++-- src/math/mod.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename src/math/{math_constants.rs => constants.rs} (100%) diff --git a/src/math/math_constants.rs b/src/math/constants.rs similarity index 100% rename from src/math/math_constants.rs rename to src/math/constants.rs diff --git a/src/math/eval.rs b/src/math/eval.rs index f5771ab..f21904a 100644 --- a/src/math/eval.rs +++ b/src/math/eval.rs @@ -1,7 +1,7 @@ use rust_decimal::MathematicalOps; use crate::math::{ - functions, math_constants, + constants, functions, types::{Expression, Operator}, }; @@ -9,7 +9,7 @@ pub fn eval_expr(expr: Expression) -> Expression { match expr { Expression::Number(_) => expr, Expression::Variable(name) => { - if let Some(value) = math_constants::get(&name) { + if let Some(value) = constants::get(&name) { Expression::Number(value) } else { Expression::Variable(name) diff --git a/src/math/mod.rs b/src/math/mod.rs index 8058061..105326f 100644 --- a/src/math/mod.rs +++ b/src/math/mod.rs @@ -3,11 +3,11 @@ use crate::math::types::Expression; #[cfg(test)] mod tests; +mod constants; mod display; mod eval; mod functions; mod lexer; -mod math_constants; mod parser; pub mod types;