From 27d1c37b1c293abb0080d73e528ce7859a6cd87b Mon Sep 17 00:00:00 2001 From: Rock070 Date: Sat, 30 Dec 2023 12:13:20 +0800 Subject: [PATCH] Fix current_favorite_color function to return a String --- exercises/09_strings/strings1.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/exercises/09_strings/strings1.rs b/exercises/09_strings/strings1.rs index f50e1fa9..c3212914 100644 --- a/exercises/09_strings/strings1.rs +++ b/exercises/09_strings/strings1.rs @@ -5,13 +5,11 @@ // Execute `rustlings hint strings1` or use the `hint` watch subcommand for a // hint. -// I AM NOT DONE - fn main() { let answer = current_favorite_color(); println!("My current favorite color is {}", answer); } fn current_favorite_color() -> String { - "blue" + String::from("blue") }