Closed federicomenaquintero closed 7 years ago
@federicomenaquintero wow! thanks that does look much better and ? is indeed exactly what I needed. I did find the mention of ? operator in try! docs but it's hard to find docs on ? for obvious reasons. :)
I took the liberty of modifying your commit log, I hope you don't mind.
Heh - the only reference I found to ? was in https://doc.rust-lang.org/reference.html#unary-operator-expressions - I saw some example code use it. I didn't really look in the try! docs. The "Error handling" chapter in the stable rust book doesn't mention it. Maybe the new book (which is awesome) will!
Feel free to modify anything you like in those commits.
Protip: try!(foo) is equivalent to "foo?".