4 ms·
You're right. I must have misunderstood something I read.
by kyllo 12y ago
You're right. I must have misunderstood something I read.
- steveklabnik 12y agoCool :)
- kyllo 12y agoAhh, I remember what it was. I saw a code snippet like this: let input = reader.read_line().ok().expect("Failed to read line"); And I thought "Cool, Rust has exceptions!" I'm probably too used to thinking in Python. Or maybe I'm just dyslexic and I read "expect()" as "except()". Either way, your comment prompted me to dig into it further and find out how Rust actually handles errors. So, thanks!
- steveklabnik 12y agoThanks for elaborating! I wrote that line in the docs, actually. I wonder if I should add an explicit note about exceptions not being a thing.