mirror of
https://git.aramjonghu.dev/AramJonghu/rustlings.git
synced 2026-09-06 18:13:29 +02:00
progress(enums + strings): ___
This commit is contained in:
@@ -46,6 +46,13 @@ impl State {
|
||||
fn process(&mut self, message: Message) {
|
||||
// TODO: Create a match expression to process the different message
|
||||
// variants using the methods defined above.
|
||||
match message {
|
||||
Message::Resize { width, height } => self.resize(width, height),
|
||||
Message::Move(point) => self.move_position(point),
|
||||
Message::Echo(s) => self.echo(s),
|
||||
Message::ChangeColor(red, green, blue) => self.change_color(red, green, blue),
|
||||
Message::Quit => self.quit(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user