From bd63ece47cbb6bde9e2fe53db543a8d22a246f5e Mon Sep 17 00:00:00 2001 From: mo8it Date: Sat, 22 Jun 2024 12:05:28 +0200 Subject: string1 solution --- solutions/09_strings/strings1.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'solutions/09_strings/strings1.rs') diff --git a/solutions/09_strings/strings1.rs b/solutions/09_strings/strings1.rs index 4e18198..f7ba811 100644 --- a/solutions/09_strings/strings1.rs +++ b/solutions/09_strings/strings1.rs @@ -1 +1,9 @@ -// Solutions will be available before the stable release. Thank you for testing the beta version 🥰 +fn current_favorite_color() -> String { + // Equivalent to `String::from("blue")` + "blue".to_string() +} + +fn main() { + let answer = current_favorite_color(); + println!("My current favorite color is {answer}"); +} -- cgit v1.2.3