Step Into Labs

Step Into Rust · Lesson 7 · Robust Rust

Vectors, Slices & Iterators

Vec, slices, iterator chains, HashMap, sorting and deduplicating.

Part of Step Into Rust. The full lesson, its missions and the real compiler and debugger are in the course. Try a free lesson first to see how it works.

Vec<T> is the dynamic array you built by hand with realloc in C, with bounds checks:

In this lesson

Missions

  1. Grow a vector
  2. An iterator chain
  3. Count words
  4. Sort and deduplicate