tatterdemalion@programming.dev to Programmer Humor@programming.devEnglish · 8 months agoOh yea, that's the good stuff huffs glueprogramming.devimagemessage-square15fedilinkarrow-up1172arrow-down13
arrow-up1169arrow-down1imageOh yea, that's the good stuff huffs glueprogramming.devtatterdemalion@programming.dev to Programmer Humor@programming.devEnglish · 8 months agomessage-square15fedilink
minus-squareGissaMittJobb@lemmy.mllinkfedilinkarrow-up7·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-up6·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.