Re:TodoMVC in Rust
by valarauca1 on Wednesday September 23, 2015 @11:37AM
(#10265673)
>which means a lot of unwrapping
In rust is generally a bad pattern to use. Its basically short hand for
So if you don't met the condition, you explode. When ever you see .unwrap() in Rust just mentally switch it for /TODO add error handling */
[ Parent
| on HN ]
Re:TodoMVC in Rust
by steveklabnik on Wednesday September 23, 2015 @11:59AM
(#10265829)
Yeah, I was just using "unwrapping" as a more general term for "extract the T out."
We almost changed 'unwrap' to 'assert', but people found it a bit too weird.
Re:TodoMVC in Rust
by valarauca1 on Wednesday September 23, 2015 @12:15PM
(#10265941)
>We almost changed 'unwrap' to 'assert', but people found it a bit too weird.
That is weird. idk I guess its already sort of being done, you're more or less asserting Option::Some( _ ) is the value.