trpl-zh-cn/listings/ch08-common-collections/listing-08-06/src/main.rs
2022-02-06 16:43:51 +08:00

9 lines
163 B
Rust
Executable File

fn main() {
// ANCHOR: here
let v = vec![1, 2, 3, 4, 5];
let does_not_exist = &v[100];
let does_not_exist = v.get(100);
// ANCHOR_END: here
}