diff --git a/src/flow_control/for.md b/src/flow_control/for.md index 23445fe4fd..b5d5d62721 100644 --- a/src/flow_control/for.md +++ b/src/flow_control/for.md @@ -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"]; @@ -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"]; @@ -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"];