mirror of
https://github.com/rust-lang/rustlings.git
synced 2024-12-02 09:12:01 +02:00
enums1 solution
This commit is contained in:
parent
d6fd251a73
commit
a2dfbd86da
@ -1,6 +1,6 @@
|
||||
#[derive(Debug)]
|
||||
enum Message {
|
||||
// TODO: define a few types of messages as used below
|
||||
// TODO: Define a few types of messages as used below.
|
||||
}
|
||||
|
||||
fn main() {
|
||||
|
@ -1 +1,14 @@
|
||||
// Solutions will be available before the stable release. Thank you for testing the beta version 🥰
|
||||
#[derive(Debug)]
|
||||
enum Message {
|
||||
Quit,
|
||||
Echo,
|
||||
Move,
|
||||
ChangeColor,
|
||||
}
|
||||
|
||||
fn main() {
|
||||
println!("{:?}", Message::Quit);
|
||||
println!("{:?}", Message::Echo);
|
||||
println!("{:?}", Message::Move);
|
||||
println!("{:?}", Message::ChangeColor);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user