aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lib.rs b/src/lib.rs
index c623af2..8bd62ba 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -26,13 +26,13 @@ impl Calculator {
return;
}
};
- match op {
- Operator::Add => self.stack.push(lhs + rhs),
- Operator::Sub => self.stack.push(lhs - rhs),
- Operator::Mul => self.stack.push(lhs * rhs),
- Operator::Div => self.stack.push(lhs / rhs),
- Operator::Exp => self.stack.push(lhs.powf(rhs)),
- }
+ self.stack.push(match op {
+ Operator::Add => lhs + rhs,
+ Operator::Sub => lhs - rhs,
+ Operator::Mul => lhs * rhs,
+ Operator::Div => lhs / rhs,
+ Operator::Exp => lhs.powf(rhs),
+ });
}
}