Skip to content

Glossary: Rust Basics

if let

A shorter form of `match` that runs a block only if a value fits one pattern, such as `if let Some(cents) = price`. It doesn't check the other cases.

Where the book teaches it

Related terms

matchOptionPattern