From 2f821aa30da3640060741de552e5e6fd27d35778 Mon Sep 17 00:00:00 2001 From: HerschelW Date: Fri, 30 Dec 2022 08:14:13 -0600 Subject: [PATCH] chore: update enums3.rs addressing extra parentheses usage with tuples --- exercises/enums/enums3.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/exercises/enums/enums3.rs b/exercises/enums/enums3.rs index 54fd6f6..a2a9d58 100644 --- a/exercises/enums/enums3.rs +++ b/exercises/enums/enums3.rs @@ -38,6 +38,7 @@ impl State { fn process(&mut self, message: Message) { // TODO: create a match expression to process the different message variants + // Remember: When passing a tuple as a function argument, you'll need extra parentheses: fn function((t, u, p, l, e)) } } @@ -52,7 +53,7 @@ mod tests { position: Point { x: 0, y: 0 }, color: (0, 0, 0), }; - state.process(Message::ChangeColor((255, 0, 255))); // Remember: The extra parentheses mark a tuple type. + state.process(Message::ChangeColor(255, 0, 255)); state.process(Message::Echo(String::from("hello world"))); state.process(Message::Move(Point { x: 10, y: 15 })); state.process(Message::Quit);