Re:A guide to error handling in Rust
by anacrolix on Wednesday November 09, 2022 @05:50AM
(#33529700)
try blocks? is this a bit out of date?
[ Parent
| on HN ]
Re:A guide to error handling in Rust
by tialaramex on Wednesday November 09, 2022 @06:10AM
(#33529828)
How so? As it says this is not yet a stable feature, but if you run nightly Rust it's available.
Try blocks let you do what ? (the Try operator) does within a block, rather than needing to split out a separate function for it, which makes sense because why should functions be special in this way?
Re:A guide to error handling in Rust
by Spiritus on Wednesday November 09, 2022 @06:05AM
(#33529788)
I think you're mixing up try blocks with the old try! macro.
Nope, try blocks are a new (unstable) feature