3 ms·
I like Rust from what I've tried. But I'd have preferred something like this: let file = file.unwrapOrPanicWith("file was null"); option.expect(message) doe
by jeswin 6y ago
I like Rust from what I've tried. But I'd have preferred something like this:
let file = file.unwrapOrPanicWith("file was null");
option.expect(message) doesn't semantically make sense.
- jack1243star 6y agoI read it as expect (prepare) for the worst!
- steveklabnik 6y agoThere was some discussion about this when the method was named; you're not alone. In the end, it is what it is. You could define your own method like that if you really wanted to.