mirror of
https://github.com/KaiserY/trpl-zh-cn
synced 2025-05-12 10:28:04 +08:00
12 lines
185 B
Rust
Executable File
12 lines
185 B
Rust
Executable File
fn main() {
|
|
// ANCHOR: here
|
|
let mut v = vec![1, 2, 3, 4, 5];
|
|
|
|
let first = &v[0];
|
|
|
|
v.push(6);
|
|
|
|
println!("The first element is: {}", first);
|
|
// ANCHOR_END: here
|
|
}
|