Format code
This commit is contained in:
parent
ece22c6b35
commit
0acbcd8958
@ -1,9 +1,9 @@
|
||||
use std::collections::HashMap;
|
||||
|
||||
use EvalexprError;
|
||||
use EvalexprResult;
|
||||
use function::Function;
|
||||
use value::value_type::ValueType;
|
||||
use EvalexprError;
|
||||
use EvalexprResult;
|
||||
|
||||
use crate::value::Value;
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
//! They are meant as shortcuts to not write the same error checking code everywhere.
|
||||
|
||||
use token::PartialToken;
|
||||
use value::{TupleType, value_type::ValueType};
|
||||
use value::{value_type::ValueType, TupleType};
|
||||
|
||||
use crate::value::Value;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
use value::{FloatType, IntType};
|
||||
use EvalexprError;
|
||||
use Function;
|
||||
use value::{FloatType, IntType};
|
||||
use Value;
|
||||
|
||||
pub fn builtin_function(identifier: &str) -> Option<Function> {
|
||||
|
@ -1,3 +1,6 @@
|
||||
use token;
|
||||
use tree;
|
||||
use value::TupleType;
|
||||
use Context;
|
||||
use EmptyContext;
|
||||
use EvalexprError;
|
||||
@ -5,10 +8,7 @@ use EvalexprResult;
|
||||
use FloatType;
|
||||
use IntType;
|
||||
use Node;
|
||||
use token;
|
||||
use tree;
|
||||
use Value;
|
||||
use value::TupleType;
|
||||
|
||||
/// Evaluate the given expression string.
|
||||
///
|
||||
|
@ -282,7 +282,7 @@ pub use error::{EvalexprError, EvalexprResult};
|
||||
pub use function::Function;
|
||||
pub use interface::*;
|
||||
pub use tree::Node;
|
||||
pub use value::{FloatType, IntType, TupleType, Value, value_type::ValueType};
|
||||
pub use value::{value_type::ValueType, FloatType, IntType, TupleType, Value};
|
||||
|
||||
mod context;
|
||||
pub mod error;
|
||||
|
@ -1,8 +1,8 @@
|
||||
use token::Token;
|
||||
use value::TupleType;
|
||||
use EmptyContext;
|
||||
use FloatType;
|
||||
use IntType;
|
||||
use token::Token;
|
||||
use value::TupleType;
|
||||
|
||||
use crate::{
|
||||
context::Context,
|
||||
|
@ -1,6 +1,6 @@
|
||||
extern crate evalexpr;
|
||||
|
||||
use evalexpr::{*, error::*};
|
||||
use evalexpr::{error::*, *};
|
||||
|
||||
#[test]
|
||||
fn test_unary_examples() {
|
||||
@ -212,7 +212,7 @@ fn test_n_ary_functions() {
|
||||
expect_number(&arguments[2])?;
|
||||
|
||||
if let (Value::Int(a), Value::Int(b), Value::Int(c)) =
|
||||
(&arguments[0], &arguments[1], &arguments[2])
|
||||
(&arguments[0], &arguments[1], &arguments[2])
|
||||
{
|
||||
Ok(Value::Int(a * b + c))
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user