Skip to content

Patterns practice problems in Rust

Difficulty:
Category & tags Filters active
Category:
Tag:

Showing 10 of 10

Title Difficulty
Binding values with @ and or-patterns Medium
Count enum variants with matches! Easy
Destructuring structs and nested patterns Medium
Grade scores with match guards Medium
Keep a guard alive with a named binding Medium
Literal, range and or-patterns Easy
match and exhaustiveness: the compiler as a checklist Easy
Ranges: .., ..=, and range patterns Easy
Refutability, and every place a pattern can appear Medium
Slice and array patterns, and rest @ .. Medium