1
0
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:
mo8it 2024-06-21 23:00:38 +02:00
parent d6fd251a73
commit a2dfbd86da
2 changed files with 15 additions and 2 deletions

View File

@ -1,6 +1,6 @@
#[derive(Debug)] #[derive(Debug)]
enum Message { enum Message {
// TODO: define a few types of messages as used below // TODO: Define a few types of messages as used below.
} }
fn main() { fn main() {

View File

@ -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);
}