Rustacean Station  cover image

Glidesort with Orson Peters

Rustacean Station

CHAPTER

How to Implement a Panic in Rust

Rust has this thing called a panic. They're kind of similar to C++ exceptions in that you can catch them and they are what's known as unwinding exceptions or unwinding panics. In Rust, you can't say like, Oh, you panicked in your comparison operator. Well, you're not allowed to look at the array anymore. You can't do that in Rust. We have to be safe and sound always. It's essentially impossible to write almost any sorting algorithm without unsafe code.

00:00
Transcript
Play full episode

Remember Everything You Learn from Podcasts

Save insights instantly, chat with episodes, and build lasting knowledge - all powered by AI.
App store bannerPlay store banner