diff options
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs index 5540da9..94f4cbc 100644 --- a/src/main.rs +++ b/src/main.rs | |||
@@ -193,6 +193,9 @@ fn parse_arguments() -> Configuration { | |||
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().replace(" ", ""); | 195 | let input = input.trim().replace(" ", ""); |
196 | if input == "help" { | ||
197 | return Err(CalcError::Help); | ||
198 | } | ||
196 | if input.is_empty() { | 199 | if input.is_empty() { |
197 | return Ok(0.); | 200 | return Ok(0.); |
198 | } | 201 | } |