rust collect to vector of type code example Example: push and item to vector rust let mut vec = vec![10]; vec.push(100); assert_eq!(vec[1], 100);