News for hackers. Stuff that matters.
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?
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.
Re:A guide to error handling in Rust by nrc on Wednesday November 09, 2022 @06:03AM (#33529772)
Nope, try blocks are a new (unstable) feature
Re:A guide to error handling in Rust by anacrolix on Wednesday November 09, 2022 @09:22AM (#33531946)
I have indeed confused it with try! macro