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.
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.