You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
rustlings/exercises
frogtd d75759e829
fix(move_semantics5): change &mut *y to &mut x (#814)
Instead of having to explain why 
```rs
let mut x = 100; 
let y = &mut x;
let mut z_owned = *y;
let z = &mut z_owned;
*y += 100;
*z += 1000;
```
and 
```rs
let mut x = 100; 
let y = &mut x;
let z = &mut *y;
*y += 100;
*z += 1000;
```
are different, you still get the point across about having only one mutable reference.
As it stands, this exercise does too much (dereferencing and having only one mutable reference), and by doing so confuses people.

Example of someone being confused by this:
<https://discord.com/channels/273534239310479360/273541522815713281/872689531428692040>
3 years ago
..
clippy docs(exercises): updated all exercises readme files 3 years ago
collections docs: Update collections README with HashMap link 3 years ago
conversions Merge pull request #737 from ghost/correct-small-typo 3 years ago
enums docs(exercises): updated all exercises readme files 3 years ago
error_handling address review feedback 3 years ago
functions docs(exercises): updated all exercises readme files 3 years ago
generics fix: add hints to generics1 and generics2 exercises 3 years ago
if docs(exercises): updated all exercises readme files 3 years ago
macros docs(exercises): updated all exercises readme files 3 years ago
modules fix(modules2): fix typo (#835) 3 years ago
move_semantics fix(move_semantics5): change &mut *y to &mut x (#814) 3 years ago
option feat: Add move_semantics5 exercise. (#746) 3 years ago
primitive_types docs(exercises): updated all exercises readme files 3 years ago
standard_library_types Merge pull request #732 from apogeeoak/iterators5 3 years ago
strings docs(exercises): updated all exercises readme files 3 years ago
structs fix: remove trailing whitespace 3 years ago
tests docs(exercises): updated all exercises readme files 3 years ago
threads docs(exercises): updated all exercises readme files 3 years ago
traits docs(exercises): updated all exercises readme files 3 years ago
variables fix(variables5): confine the answer further 3 years ago
README.md feat(modules): update exercises, add modules3 (#822) 3 years ago
quiz1.rs feat(quiz1): add default function name in comment (#838) 3 years ago
quiz2.rs fix(exercises): adding question mark to quiz2 4 years ago
quiz3.rs fix(quiz3): Force an answer to Q2 (#672) 4 years ago
quiz4.rs feat: renames test to quiz, fixes #244 4 years ago

README.md

Exercise to Book Chapter mapping

Exercise Book Chapter
variables §3.1
functions §3.3
if §3.5
move_semantics §4.1
primitive_types §4.3
structs §5.1
enums §6
modules §7
collections §8.1, §8.3
strings §8.2
error_handling §9
generics §10
option §10.1
traits §10.2
tests §11.1
standard_library_types §13.2
threads §16.1
macros §19.6
clippy n/a
conversions n/a