---
title: Filter vector of numbers in Rust
timestamp: 2024-03-29T12:14:01
author: szabgab
published: true
description:
tags:
    - filter
    - collect
---

Using a range to create a vector of numbers.

Using `filter` to create lists of selected numbers.

We had two dereference the numbers to be able to compare them.

{% include file="examples/filter-vector-of-numbers/src/main.rs" %}


