Skip to content

Commit d7c5489

Browse files
authored
Merge pull request #1178 from sebadoh/patch-1
19.2 Vectors Error in Code Example
2 parents 904280f + d29dd5e commit d7c5489

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/std/vec.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ be surpassed, the vector is reallocated with a larger capacity.
1010
```rust,editable,ignore,mdbook-runnable
1111
fn main() {
1212
// Iterators can be collected into vectors
13-
let collected_iterator: Vec<i32> = (0..10).collect();
13+
let mut collected_iterator: Vec<i32> = (0..10).collect();
1414
println!("Collected (0..10) into: {:?}", collected_iterator);
1515
1616
// The `vec!` macro can be used to initialize a vector

0 commit comments

Comments
 (0)