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
into her program, but then was unsure what to do, possibly because she thought that the example code above would define a variable named "my_number". I suggested to her that the tutorial could instead suggest:
This is to clarify that match construct doesn't define a new variable, since I
observed a person reading the Rust tutorial who seemed to incorrectly think
that it did. Fixesrust-lang#13571 .
Fix indentation of website code snippets
Fixesrust-lang#13568
Follow up to rust-lang#13359, I didn't catch that it swapped the `strip_prefix` out for a `trim` but they aren't interchangeable here
changelog: none
Reading http://static.rust-lang.org/doc/master/tutorial.html#pattern-matching, my partner copied the example code:
into her program, but then was unsure what to do, possibly because she thought that the example code above would define a variable named "my_number". I suggested to her that the tutorial could instead suggest:
and that made sense to her.
The text was updated successfully, but these errors were encountered: