Re:Announcing Rust 1.14
by lisivka on Thursday December 22, 2016 @03:56PM
(#13240318)
With proper error handling instead of unwrap(), which means "I don't care about errors here".
[ Parent
| on HN ]
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.