File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -67,17 +67,20 @@ fn main() {
67
67
for name in names.iter() {
68
68
match name {
69
69
&"Ferris" => println!("There is a rustacean among us!"),
70
+ // TODO ^ Try deleting the & and matching just "Ferris"
70
71
_ => println!("Hello {}", name),
71
72
}
72
73
}
74
+
75
+ println!("names: {:?}", names);
73
76
}
74
77
```
75
78
76
79
* ` into_iter ` - This consumes the collection so that on each iteration the exact
77
80
data is provided. Once the collection has been consumed it is no longer
78
81
available for reuse as it has been 'moved' within the loop.
79
82
80
- ``` rust, editable
83
+ ``` rust, editable, ignore
81
84
fn main() {
82
85
let names = vec!["Bob", "Frank", "Ferris"];
83
86
@@ -87,6 +90,9 @@ fn main() {
87
90
_ => println!("Hello {}", name),
88
91
}
89
92
}
93
+
94
+ println!("names: {:?}", names);
95
+ // FIXME ^ Comment out this line
90
96
}
91
97
```
92
98
You can’t perform that action at this time.
0 commit comments