Vector is a core collection in Rust. Vector(Vec) can be used for storing a list of values or even if you need a Stack — it’s your data type. Rust language is pretty fast and secure however dealing with borrowing, ownership, and lifespan lifecycle is a high wall that often you can bash your head pretty hard against it. Returning Vecs and passing them as parameters could be pretty challenging if you were new to Rust. Strings also are pretty challenging in Rust. So today I want to share a video doing common operations with Vecs but always using functions and passing Vecs and Receiving Vecs. Hopefully, this will be useful in your common and daily work with Rust. Let’s get started!
rust-playground is a set of rust useful code and poc. - diegopacheco/rust-playground
Originally published at http://diego-pacheco.blogspot.com on July 2, 2021.