tatterdemalion@programming.dev to Programmer Humor@programming.devEnglish · 8 months agoOh yea, that's the good stuff huffs glueprogramming.devimagemessage-square7fedilinkarrow-up19arrow-down10
arrow-up19arrow-down1imageOh yea, that's the good stuff huffs glueprogramming.devtatterdemalion@programming.dev to Programmer Humor@programming.devEnglish · 8 months agomessage-square7fedilink
minus-squareGissaMittJobb@lemmy.mllinkfedilinkarrow-up0·8 months agoSince all of the expressions just wrap a None, I wouldn’t be surprised if the transmutes basically get compiled to 0, making the assertion at the end assert_eq!(0 * 0, 0).
minus-squaretatterdemalion@programming.devOPlinkfedilinkarrow-up1·edit-28 months agoNah these are the actual integer representations. Otherwise you would have Some(None) == Some(Some(None)) which is way too Javascripty for Rust folks.
Since all of the expressions just wrap a
None
, I wouldn’t be surprised if the transmutes basically get compiled to0
, making the assertion at the endassert_eq!(0 * 0, 0)
.Nah these are the actual integer representations. Otherwise you would have
Some(None) == Some(Some(None))
which is way too Javascripty for Rust folks.