From 6c38d9b13b8e1cc976f9b22d15d100fd03ee54d4 Mon Sep 17 00:00:00 2001 From: Ivan Tham Date: Sat, 3 Aug 2019 13:49:17 +0800 Subject: Reuse ans output and fix tests --- src/readline/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/readline') diff --git a/src/readline/mod.rs b/src/readline/mod.rs index 9ae14ba..97f03bd 100644 --- a/src/readline/mod.rs +++ b/src/readline/mod.rs @@ -23,7 +23,7 @@ impl Highlighter for LineHighlighter { Owned(format!("\x1b[90m{}\x1b[0m", hint)) } fn highlight<'l>(&self, line: &'l str, _: usize) -> Cow<'l, str> { - let op = eval_math_expression(line, &mut 0f64); + let op = eval_math_expression(line, 0f64); match op { Ok(_) => { let functions = [ -- cgit v1.2.3