Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/flow_control/for.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ within.
* `iter` - This borrows each element of the collection through each iteration.
Thus leaving the collection untouched and available for reuse after the loop.

```rust, editable
```rust,editable
fn main() {
let names = vec!["Bob", "Frank", "Ferris"];

Expand All @@ -80,7 +80,7 @@ fn main() {
data is provided. Once the collection has been consumed it is no longer
available for reuse as it has been 'moved' within the loop.

```rust, editable, ignore
```rust,editable,ignore,mdbook-runnable
fn main() {
let names = vec!["Bob", "Frank", "Ferris"];

Expand All @@ -99,7 +99,7 @@ fn main() {
* `iter_mut` - This mutably borrows each element of the collection, allowing for
the collection to be modified in place.

```rust, editable
```rust,editable
fn main() {
let mut names = vec!["Bob", "Frank", "Ferris"];

Expand Down