You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I was doing rustlings, I got confused in the comment of this code. I will put here the whole rustling since it is not big:
// TODO: Fix the compiler error in the `main` function without changing this function.fnis_a_color_word(attempt:&str) -> bool{
attempt == "green" || attempt == "blue" || attempt == "red"}fnmain(){let word = String::from("green");// Don't change this line.ifis_a_color_word(word){println!("That is a color word I know!");}else{println!("That is not a color word I know.");}}
Main confusion cause is the word this. At first I thought that this might relate to main function because it goes right after it being mentioned in the sentence, then I thought that it might mean function that is directly below.
I believe it is possible to completely eliminate the confusion.
Suggestion:
replace this with the actual name of the funciton is_a_color_word
the whole comment would then look like:
// TODO: Fix the compiler error in the `main` function without changing `is_a_color_word` function.
The text was updated successfully, but these errors were encountered:
When I was doing rustlings, I got confused in the comment of this code. I will put here the whole rustling since it is not big:
Main confusion cause
is the wordthis
. At first I thought that this might relate to main function because it goes right after it being mentioned in the sentence, then I thought that it might mean function that is directly below.I believe it is possible to completely eliminate the confusion.
Suggestion:
this
with the actual name of the funcitonis_a_color_word
// TODO: Fix the compiler error in the `main` function without changing `is_a_color_word` function.
The text was updated successfully, but these errors were encountered: