mirror of
https://github.com/rust-lang/rustlings.git
synced 2026-03-31 03:29:19 +00:00
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:
parent
37cbcd9049
commit
5b88aaa4d8
@ -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"
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user