enums3: Avoid confusion with parentheses

This commit is contained in:
mo8it
2024-07-07 15:29:05 +02:00
parent 01b8432d58
commit 708cfef3f7
2 changed files with 8 additions and 8 deletions
+3 -3
View File
@@ -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(),
}
}