From bd63ece47cbb6bde9e2fe53db543a8d22a246f5e Mon Sep 17 00:00:00 2001 From: mo8it Date: Sat, 22 Jun 2024 12:05:28 +0200 Subject: string1 solution --- exercises/09_strings/strings1.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'exercises/09_strings') diff --git a/exercises/09_strings/strings1.rs b/exercises/09_strings/strings1.rs index de762eb..6abdbb4 100644 --- a/exercises/09_strings/strings1.rs +++ b/exercises/09_strings/strings1.rs @@ -1,10 +1,9 @@ -// Make me compile without changing the function signature! +// TODO: Fix the compiler error without changing the function signature. +fn current_favorite_color() -> String { + "blue" +} fn main() { let answer = current_favorite_color(); - println!("My current favorite color is {}", answer); -} - -fn current_favorite_color() -> String { - "blue" + println!("My current favorite color is {answer}"); } -- cgit v1.2.3