Dhghomon / easy_rust

Rust explained using easy English
MIT License
8.05k stars 376 forks source link

"LOWERCASE" error in "Taking User Input"? #135

Closed markcharney closed 3 years ago

markcharney commented 3 years ago

Hi. New to rust so maybe I'm wrong... I tried the example in "Taking User Input" where you use "cargo run LOWERCASE Does this work too?" and it did not convert "Does" to lower case, as shown in the book online here: https://dhghomon.github.io/easy_rust/Chapter_63.html ... If "LOWERCASE" matched "lowercase" in the "match" , it would imply that that match on a string would be case insensitive. I think you just need to change "LOWERCASE" to "lowercase" in the example run.

Dhghomon commented 3 years ago

Good eye! Yeah, that part shouldn't be uppercase - fixed now.

Dhghomon commented 3 years ago

By the way (since you're new to Rust) it would be easy to make the input lowercase before matching but we'll just assume here that the user isn't having their hand held so looks good as is with your fix.