From a2dfbd86da3271eb07b57a89a359ce2efdcc3544 Mon Sep 17 00:00:00 2001 From: mo8it Date: Fri, 21 Jun 2024 23:00:38 +0200 Subject: [PATCH] enums1 solution --- exercises/08_enums/enums1.rs | 2 +- solutions/08_enums/enums1.rs | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/exercises/08_enums/enums1.rs b/exercises/08_enums/enums1.rs index d63de83..99f7087 100644 --- a/exercises/08_enums/enums1.rs +++ b/exercises/08_enums/enums1.rs @@ -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() { 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); +}