3 ms·
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
by runevault 8y 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).
- kibwen 8y agoAgreed, being able to get rid of spurious unwraps in trivial code and small code examples and replace them with idiomatic error handling is lovely. :)
- bvinc 8y agoThe 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.