Prelude to Vectors in the Rust Programming Language

In this post, we are going to explore in detail how to work with resizable arrays in Rust. Specifically, we will take a closer look at the Vector type, its syntax, and some use cases like filtering and transforming a collection.

Responses (1)

A vector can be initialized using the Vec::new function which returns a new empty vector. In order to be able to add elements to it, the new vector variable also needs to be mutable (the mut keyword).
Avatar Image
Franchesca Wright4 years ago
I think this paragraph should come before the code box.
Clap
0|1|
Clap
0|1