News for hackers. Stuff that matters.
Re:Announcing Rust 1.14 by Dylan16807 on Thursday December 22, 2016 @04:16PM (#13240461)
What does proper error handling look like when I want to use the same "invalid node" error for most of those unwrap calls?
Re:Announcing Rust 1.14 by staticassertion on Thursday December 22, 2016 @07:28PM (#13241782)
You can use map or and_then, you can write a macro, you can use try!, you can use if let, etc. There are lots of ways to handle errors in rust.
Re:Announcing Rust 1.14 by EugeneOZ on Thursday December 22, 2016 @04:52PM (#13240696)
Use "try" or "?" if possible, pattern matching otherwise.