• GissaMittJobb@lemmy.ml
    link
    fedilink
    arrow-up
    0
    ·
    1 year ago

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

    • tatterdemalion@programming.devOP
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      1 year ago

      Nah these are the actual integer representations. Otherwise you would have Some(None) == Some(Some(None)) which is way too Javascripty for Rust folks.