From f880482f06acc3d22e4eddc3f040dd133b0f2369 Mon Sep 17 00:00:00 2001 From: Sebastian Schmidt Date: Wed, 2 Jun 2021 16:50:37 +0300 Subject: [PATCH] Move predefined module into context module. --- src/context/mod.rs | 8 ++++++-- src/{ => context}/predefined/mod.rs | 2 +- src/lib.rs | 1 - 3 files changed, 7 insertions(+), 4 deletions(-) rename src/{ => context}/predefined/mod.rs (92%) diff --git a/src/context/mod.rs b/src/context/mod.rs index ef27b6f..1cac94c 100644 --- a/src/context/mod.rs +++ b/src/context/mod.rs @@ -6,9 +6,13 @@ use std::collections::HashMap; -use crate::{function::Function, value::value_type::ValueType, EvalexprError, EvalexprResult}; +use crate::{ + function::Function, + value::{value_type::ValueType, Value}, + EvalexprError, EvalexprResult, +}; -use crate::value::Value; +mod predefined; /// An immutable context. pub trait Context { diff --git a/src/predefined/mod.rs b/src/context/predefined/mod.rs similarity index 92% rename from src/predefined/mod.rs rename to src/context/predefined/mod.rs index 05ca62d..1b1f4b6 100644 --- a/src/predefined/mod.rs +++ b/src/context/predefined/mod.rs @@ -1,4 +1,4 @@ -/// Context with all f64::consts available by default. +/// Context with all Rust's constants in `f64::consts` available by default. /// Alternatively, specifiy constants with `math_consts_context!(E, PI, TAU, ...)` /// Available constants can be found in the [`core::f64::consts module`](https://doc.rust-lang.org/nightly/core/f64/consts/index.html). #[macro_export] diff --git a/src/lib.rs b/src/lib.rs index b8ec723..02c26bf 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -523,7 +523,6 @@ mod feature_serde; mod function; mod interface; mod operator; -mod predefined; mod token; mod tree; mod value;