1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-06-15 13:50:27 +02:00

Simplify Vec slide (#313)

The code is probably meant to illustrate the `vec!` macro, but it
feels out of place when teaching: there is already enough material
here to get through.
This commit is contained in:
Martin Geisler
2023-02-01 10:49:11 +01:00
committed by GitHub
parent d6182ea498
commit 476ee283c6

View File

@ -12,9 +12,6 @@ fn main() {
v2.extend(v1.iter());
v2.push(9999);
println!("v2: len = {}, capacity = {}", v2.len(), v2.capacity());
let mut numbers = vec![1, 2, 3];
numbers.push(42);
}
```