Clarify confusing comment in strings2.rs

Fixes #2230
Replaced vague wording "this function" with the explicit function name "is_a_color_word" to improve clarity for beginners.
This commit is contained in:
Krishna Kumar 2026-03-29 11:15:54 +05:30 committed by GitHub
parent 37cbcd9049
commit 5b88aaa4d8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,4 +1,4 @@
// TODO: Fix the compiler error in the `main` function without changing this function. // TODO: Fix the compiler error in the `main` function without changing the `is_a_color_word` function.
fn is_a_color_word(attempt: &str) -> bool { fn is_a_color_word(attempt: &str) -> bool {
attempt == "green" || attempt == "blue" || attempt == "red" attempt == "green" || attempt == "blue" || attempt == "red"
} }