From c0768cc4da243b07071a4c54598c5467456344e4 Mon Sep 17 00:00:00 2001 From: Rock070 Date: Sat, 30 Dec 2023 16:49:41 +0800 Subject: [PATCH] Fix function argument in strings2.rs --- exercises/09_strings/strings2.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/exercises/09_strings/strings2.rs b/exercises/09_strings/strings2.rs index 4d95d16a..ca16ea3d 100644 --- a/exercises/09_strings/strings2.rs +++ b/exercises/09_strings/strings2.rs @@ -5,11 +5,9 @@ // Execute `rustlings hint strings2` or use the `hint` watch subcommand for a // hint. -// I AM NOT DONE - fn main() { let word = String::from("green"); // Try not changing this line :) - if is_a_color_word(word) { + if is_a_color_word(&word) { println!("That is a color word I know!"); } else { println!("That is not a color word I know.");