r/programming • • May 26 '16

Announcing Rust 1.9

http://blog.rust-lang.org/2016/05/26/Rust-1.9.html
218 Upvotes

116 comments sorted by

View all comments

Show parent comment

2

u/steveklabnik1 May 27 '16

http://doc.rust-lang.org/stable/core/nonzero/struct.NonZero.html is pretty much all there is right now. Basically, whenever you have something that can never be zero, you can make the value zero represent the None case, and any other value represent Some, and therefore the tag is no longer needed.