Documentation issue in Section 19.3
I have searched open and closed issues and pull requests for duplicates, using these search terms:
I have checked the latest
mainbranch to see if this has already been fixed, in this file:
URL to the section(s) of the book with this problem:
Description of the problem: Possible wording error in Section 19.3 — “Parts of a Value with a Nested _”
In Section 19.3, under “Parts of a Value with a Nested _”, the text says:
“In all other cases (if either
setting_valueornew_setting_valueisNone) expressed by the_pattern in the second arm, we want to allownew_setting_valueto becomesetting_value.”
However, the assignment being discussed is:
setting_value = new_setting_value;Since new_setting_value is assigned to setting_value, it appears the wording should instead be:
“…we want to allow
setting_valueto becomenew_setting_value.”
I believe the current wording reverses the direction of the assignment. Could you please verify?
Suggested fix: I believe the last part of the passage should be '... setting_value to become new_setting_value.'
Source: rust-lang/book