Skip to content

Commit

Permalink
Add speaker note about for and array refs
Browse files Browse the repository at this point in the history
  • Loading branch information
randomPoison committed Feb 27, 2025
1 parent 241c28e commit 3cd531b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/references/solution.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,11 @@
```rust,editable
{{#include exercise.rs:solution}}
```

<details>

- Note that in `normalize` we were able to do `*item /= mag` to modify each
element. This is because we're iterating using a reference to an array, which
causes the `for` loop to give references to each element.

</details>

0 comments on commit 3cd531b

Please sign in to comment.