1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-04-02 17:48:47 +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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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);
}
```