From dd0f4387b607b752fa47cd4be0108972643b2b71 Mon Sep 17 00:00:00 2001 From: Mark Date: Thu, 3 Aug 2023 22:05:46 -0700 Subject: [PATCH] Fixed variable name check --- src/context.rs | 3 ++- src/quantity/mod.rs | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/context.rs b/src/context.rs index 5bf76b1..c685589 100644 --- a/src/context.rs +++ b/src/context.rs @@ -40,7 +40,8 @@ impl Context { if { Function::from_string(s).is_some() || - Constant::from_string(s).is_some() + Constant::from_string(s).is_some() || + freeunit_from_string(s).is_some() } { return false } for c in s.to_lowercase().chars() { diff --git a/src/quantity/mod.rs b/src/quantity/mod.rs index 4c9dc90..6861ca6 100644 --- a/src/quantity/mod.rs +++ b/src/quantity/mod.rs @@ -23,6 +23,7 @@ mod unit; pub use crate::quantity::unit::Unit; pub use crate::quantity::unit::FreeUnit; pub use crate::quantity::unit::WholeUnit; +pub use crate::quantity::unit::freeunit_from_string; mod quantity; pub use crate::quantity::quantity::Quantity;