summaryrefslogtreecommitdiff
path: root/solutions/08_enums/enums1.rs
diff options
context:
space:
mode:
authormo8it <mo8it@proton.me>2024-06-21 23:00:38 +0200
committermo8it <mo8it@proton.me>2024-06-21 23:00:38 +0200
commita2dfbd86da3271eb07b57a89a359ce2efdcc3544 (patch)
treecf7134754ce1d8333e75929711fc602ed84f9278 /solutions/08_enums/enums1.rs
parentd6fd251a73f2abd96662b09b32f718021568675c (diff)
enums1 solution
Diffstat (limited to 'solutions/08_enums/enums1.rs')
-rw-r--r--solutions/08_enums/enums1.rs15
1 files changed, 14 insertions, 1 deletions
diff --git a/solutions/08_enums/enums1.rs b/solutions/08_enums/enums1.rs
index 4e18198..9724883 100644
--- a/solutions/08_enums/enums1.rs
+++ b/solutions/08_enums/enums1.rs
@@ -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);
+}