diff options
| author | mo8it <mo8it@proton.me> | 2024-07-07 15:29:05 +0200 |
|---|---|---|
| committer | mo8it <mo8it@proton.me> | 2024-07-07 15:29:05 +0200 |
| commit | 708cfef3f76071d71d42053453e6b9a5b858b991 (patch) | |
| tree | 62cc4d69cdf931f604a2f4dab76ae9ef66deac4b /solutions/08_enums/enums3.rs | |
| parent | 01b8432d58d8c568adfa7dcc0634bd2f24e77fbc (diff) | |
enums3: Avoid confusion with parentheses
Diffstat (limited to 'solutions/08_enums/enums3.rs')
| -rw-r--r-- | solutions/08_enums/enums3.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/solutions/08_enums/enums3.rs b/solutions/08_enums/enums3.rs index 8641fbd..4bc26b7 100644 --- a/solutions/08_enums/enums3.rs +++ b/solutions/08_enums/enums3.rs @@ -34,8 +34,8 @@ impl State { self.message = s; } - fn change_color(&mut self, color: (u8, u8, u8)) { - self.color = color; + fn change_color(&mut self, red: u8, green: u8, blue: u8) { + self.color = (red, green, blue); } fn quit(&mut self) { @@ -47,7 +47,7 @@ impl State { Message::Resize { width, height } => self.resize(width, height), Message::Move(point) => self.move_position(point), Message::Echo(s) => self.echo(s), - Message::ChangeColor(r, g, b) => self.change_color((r, g, b)), + Message::ChangeColor(r, g, b) => self.change_color(r, g, b), Message::Quit => self.quit(), } } |
