rust vector length after clear code example
Example 1: get length of vector rust
let a = vec![1, 2, 3];
assert_eq!(a.len(), 3);
Example 2: push and item to vector rust
let mut vec = vec![10];
vec.push(100);
assert_eq!(vec[1], 100);
let a = vec![1, 2, 3];
assert_eq!(a.len(), 3);
let mut vec = vec![10];
vec.push(100);
assert_eq!(vec[1], 100);