Hacker News new | ask | show | jobs
by runevault 2965 days ago
Everyone keeps talking about impl Trait (which is great) but I'm super pumped for ? working in main now. Was recently writing some code as I finally got back to rust and forgot about that edge and had to write a match block when ? would have been good enough (felt silly to make a method just to handle that).
2 comments

Agreed, being able to get rid of spurious unwraps in trivial code and small code examples and replace them with idiomatic error handling is lovely. :)
The first thing I always do is immediately make a function "main2" and make main an error handling function. It'll be nice to not have to do that.