mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-01-05 16:10:31 +02:00
Update for-expressions.md (#359)
* Update for-expressions.md * Update for-expressions.md * Update for-expressions.md * Fix formatting. --------- Co-authored-by: Andrew Walbran <qwandor@google.com>
This commit is contained in:
parent
65340c4ca1
commit
6a1282c166
@ -24,5 +24,6 @@ You can use `break` and `continue` here as usual.
|
||||
* Index iteration is not a special syntax in Rust for just that case.
|
||||
* `(0..10)` is a range that implements an `Iterator` trait.
|
||||
* `step_by` is a method that returns another `Iterator` that skips every other element.
|
||||
|
||||
* Modify the elements in the vector and explain the compiler errors. Change vector `v` to be mutable and the for loop to `for x in v.iter_mut()`.
|
||||
|
||||
</details>
|
||||
|
Loading…
Reference in New Issue
Block a user