Learn how to manage unexpected errors in Rust – division-by-zero, integer overflow, out-of-bounds array access, and failed assertions. Rust's default setting for panic handling is probably not the one you want.
Integer overflows, checked arithmetic
Type conversions that can fail
Diverging functions and the “never” type
Unwrapping Options and Results
Understand the tradeoff: unwind vs abort (preview)
Learn how to manage unexpected errors in Rust – division-by-zero, integer overflow, out-of-bounds array access, and failed assertions. Rust's default setting for panic handling is probably not the one you want.
Integer overflows, checked arithmetic
Type conversions that can fail
Diverging functions and the “never” type
Unwrapping Options and Results
Understand the tradeoff: unwind vs abort (preview)