Skip to content

Commit 526dddc

Browse files
authored
Add speaker note about for and array refs (#2665)
1 parent a4469e7 commit 526dddc

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/references/solution.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,11 @@
33
```rust,editable
44
{{#include exercise.rs:solution}}
55
```
6+
7+
<details>
8+
9+
- Note that in `normalize` we were able to do `*item /= mag` to modify each
10+
element. This is because we're iterating using a mutable reference to an
11+
array, which causes the `for` loop to give mutable references to each element.
12+
13+
</details>

0 commit comments

Comments
 (0)