aboutsummaryrefslogtreecommitdiff
path: root/src/parse.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/parse.rs')
-rw-r--r--src/parse.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/parse.rs b/src/parse.rs
index aa8bd4b..74b9841 100644
--- a/src/parse.rs
+++ b/src/parse.rs
@@ -78,12 +78,12 @@ pub fn eval_postfix(postfixed: Vec<Token>) -> Result<f64, CalcError> {
78 num_stack.push(op.operate(n1, n2)?); 78 num_stack.push(op.operate(n1, n2)?);
79 } else { 79 } else {
80 return Err(CalcError::Parser( 80 return Err(CalcError::Parser(
81 "Too many operators, Too little operands".to_string(), 81 "Too many operators, too few operands".to_string(),
82 )); 82 ));
83 } 83 }
84 } else { 84 } else {
85 return Err(CalcError::Parser( 85 return Err(CalcError::Parser(
86 "Too many operators, Too little operands".to_string(), 86 "Too many operators, too few operands".to_string(),
87 )); 87 ));
88 } 88 }
89 } 89 }
@@ -99,7 +99,7 @@ pub fn eval_postfix(postfixed: Vec<Token>) -> Result<f64, CalcError> {
99 Ok(num_stack.pop().unwrap()) 99 Ok(num_stack.pop().unwrap())
100 } else { 100 } else {
101 Err(CalcError::Parser( 101 Err(CalcError::Parser(
102 "Too many operators, Too little operands".to_string(), 102 "Too many operators, too few operands".to_string(),
103 )) 103 ))
104 } 104 }
105} 105}