From afe206beab3b9158d28884be134a2d87bfb62920 Mon Sep 17 00:00:00 2001 From: Nicole L Date: Wed, 5 Feb 2025 16:11:42 -0800 Subject: [PATCH] Add division example to expression exercise (#2605) --- src/pattern-matching/exercise.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pattern-matching/exercise.rs b/src/pattern-matching/exercise.rs index 26e732ae..273a740f 100644 --- a/src/pattern-matching/exercise.rs +++ b/src/pattern-matching/exercise.rs @@ -130,9 +130,9 @@ fn test_zeros() { fn main() { let expr = Expression::Op { - op: Operation::Sub, - left: Box::new(Expression::Value(20)), - right: Box::new(Expression::Value(10)), + op: Operation::Div, + left: Box::new(Expression::Value(10)), + right: Box::new(Expression::Value(2)), }; println!("expr: {expr:?}"); println!("result: {:?}", eval(expr));