diff options
Diffstat (limited to 'solutions/09_strings/strings1.rs')
| -rw-r--r-- | solutions/09_strings/strings1.rs | 10 |
1 files changed, 9 insertions, 1 deletions
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}"); +} |
