Fix sample code in the tutorial
This commit is contained in:
parent
689f6ce5d0
commit
9f290b5669
@ -2042,8 +2042,9 @@ as in this version of `print_all` that copies elements.
|
||||
fn print_all<T: Printable Copy>(printable_things: ~[T]) {
|
||||
let mut i = 0;
|
||||
while i < printable_things.len() {
|
||||
let copy_of_thing = printable_things[0];
|
||||
let copy_of_thing = printable_things[i];
|
||||
copy_of_thing.print();
|
||||
i += 1;
|
||||
}
|
||||
}
|
||||
~~~
|
||||
|
Loading…
Reference in New Issue
Block a user