Skip to content

Glossary: Data Structures and Algorithms in Rust

Panic

Also written: panics, panicked

A crash Rust triggers when code does something impossible, such as indexing past the end of a Vec or calling unwrap() on None. The program stops with a message naming the problem.

Where the book teaches it

Related terms

unwrap() and expect()Option