refactor
This commit is contained in:
@@ -1,18 +1,15 @@
|
||||
#![allow(dead_code)]
|
||||
|
||||
use fix::error::{Result, Source};
|
||||
use fix::runtime::Runtime;
|
||||
use fix::value::Value;
|
||||
use fix::Evaluator;
|
||||
use fix_common::Value;
|
||||
use fix_error::{Result, Source};
|
||||
|
||||
pub fn eval(expr: &str) -> Value {
|
||||
Runtime::new()
|
||||
.unwrap()
|
||||
Evaluator::new()
|
||||
.eval(Source::new_eval(expr.into()).unwrap())
|
||||
.unwrap()
|
||||
}
|
||||
|
||||
pub fn eval_result(expr: &str) -> Result<Value> {
|
||||
Runtime::new()
|
||||
.unwrap()
|
||||
.eval(Source::new_eval(expr.into()).unwrap())
|
||||
Evaluator::new().eval(Source::new_eval(expr.into()).unwrap())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user