diff --git a/src/context/mod.rs b/src/context/mod.rs index d2b2849..71cf64e 100644 --- a/src/context/mod.rs +++ b/src/context/mod.rs @@ -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; diff --git a/src/error/mod.rs b/src/error/mod.rs index 03c7736..d96cd4d 100644 --- a/src/error/mod.rs +++ b/src/error/mod.rs @@ -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; diff --git a/src/function/builtin.rs b/src/function/builtin.rs index 11003f3..2a3d352 100644 --- a/src/function/builtin.rs +++ b/src/function/builtin.rs @@ -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 { diff --git a/src/interface/mod.rs b/src/interface/mod.rs index 72fce1d..0410223 100644 --- a/src/interface/mod.rs +++ b/src/interface/mod.rs @@ -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. /// diff --git a/src/lib.rs b/src/lib.rs index ef20f88..3ce7e97 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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; diff --git a/src/tree/mod.rs b/src/tree/mod.rs index f215db4..196bf4a 100644 --- a/src/tree/mod.rs +++ b/src/tree/mod.rs @@ -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, diff --git a/tests/integration.rs b/tests/integration.rs index 7f9394d..ab2e2ee 100644 --- a/tests/integration.rs +++ b/tests/integration.rs @@ -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 {