Stuck on enums3

This commit is contained in:
Justin Kelz 2022-03-24 14:41:21 -07:00
parent 12bc6db90a
commit 6e0e3dbc60
2 changed files with 8 additions and 2 deletions

View File

@ -1,11 +1,14 @@
// enums1.rs
// Make me compile! Execute `rustlings hint enums1` for hints!
// I AM NOT DONE
#[derive(Debug)]
enum Message {
// TODO: define a few types of messages as used below
Quit,
Echo,
Move,
ChangeColor,
}
fn main() {

View File

@ -1,11 +1,14 @@
// enums2.rs
// Make me compile! Execute `rustlings hint enums2` for hints!
// I AM NOT DONE
#[derive(Debug)]
enum Message {
// TODO: define the different variants used below
Move {x: i32, y: i32},
Echo(String),
ChangeColor(i16,i16,i16),
Quit,
}
impl Message {