• GissaMittJobb@lemmy.ml
    link
    fedilink
    arrow-up
    7
    ·
    8 months 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
      6
      ·
      edit-2
      8 months 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.