diff options
author | Akshay <[email protected]> | 2020-11-06 15:12:58 +0000 |
---|---|---|
committer | Akshay <[email protected]> | 2020-11-06 15:12:58 +0000 |
commit | cf7005dc1550119a1b0b5f713d2f31cc8b7da065 (patch) | |
tree | db570b5abe22ab704fe65ba851a2d97c168e6ee3 /src | |
parent | 8ff40835ccb622c076e889ed48e5cef6480977a1 (diff) | |
parent | 72789dff9c52cf2c5ef7772b301a1d5cfd90e272 (diff) |
Merge branch 'master' into pickfire-help
Diffstat (limited to 'src')
-rw-r--r-- | src/error.rs (renamed from src/error/mod.rs) | 0 | ||||
-rw-r--r-- | src/format.rs (renamed from src/format/mod.rs) | 0 | ||||
-rw-r--r-- | src/lex.rs (renamed from src/lex/mod.rs) | 3 | ||||
-rw-r--r-- | src/main.rs | 2 | ||||
-rw-r--r-- | src/parse.rs (renamed from src/parse/mod.rs) | 0 | ||||
-rw-r--r-- | src/readline.rs (renamed from src/readline/mod.rs) | 0 |
6 files changed, 2 insertions, 3 deletions
diff --git a/src/error/mod.rs b/src/error.rs index e05d4e3..e05d4e3 100644 --- a/src/error/mod.rs +++ b/src/error.rs | |||
diff --git a/src/format/mod.rs b/src/format.rs index 45673d7..45673d7 100644 --- a/src/format/mod.rs +++ b/src/format.rs | |||
diff --git a/src/lex/mod.rs b/src/lex.rs index b3faff8..76f61a0 100644 --- a/src/lex/mod.rs +++ b/src/lex.rs | |||
@@ -5,9 +5,8 @@ | |||
5 | use lazy_static::lazy_static; | 5 | use lazy_static::lazy_static; |
6 | use std::collections::HashMap; | 6 | use std::collections::HashMap; |
7 | 7 | ||
8 | use crate::CONFIGURATION; | ||
9 | |||
10 | use crate::error::{CalcError, Math}; | 8 | use crate::error::{CalcError, Math}; |
9 | use crate::CONFIGURATION; | ||
11 | 10 | ||
12 | #[derive(Debug, Copy, Clone, PartialEq)] | 11 | #[derive(Debug, Copy, Clone, PartialEq)] |
13 | pub struct Operator { | 12 | pub struct Operator { |
diff --git a/src/main.rs b/src/main.rs index 7086d15..94f4cbc 100644 --- a/src/main.rs +++ b/src/main.rs | |||
@@ -192,7 +192,7 @@ fn parse_arguments() -> Configuration { | |||
192 | } | 192 | } |
193 | 193 | ||
194 | pub fn eval_math_expression(input: &str, prev_ans: Option<f64>) -> Result<f64, CalcError> { | 194 | pub fn eval_math_expression(input: &str, prev_ans: Option<f64>) -> Result<f64, CalcError> { |
195 | let input = input.trim(); | 195 | let input = input.trim().replace(" ", ""); |
196 | if input == "help" { | 196 | if input == "help" { |
197 | return Err(CalcError::Help); | 197 | return Err(CalcError::Help); |
198 | } | 198 | } |
diff --git a/src/parse/mod.rs b/src/parse.rs index aa8bd4b..aa8bd4b 100644 --- a/src/parse/mod.rs +++ b/src/parse.rs | |||
diff --git a/src/readline/mod.rs b/src/readline.rs index d689f95..d689f95 100644 --- a/src/readline/mod.rs +++ b/src/readline.rs | |||