jroid8@lemmy.world to Programmer Humor@lemmy.ml · 9 months agoknow the features of your languagelemmy.worldimagemessage-square144fedilinkarrow-up1640arrow-down124
arrow-up1616arrow-down1imageknow the features of your languagelemmy.worldjroid8@lemmy.world to Programmer Humor@lemmy.ml · 9 months agomessage-square144fedilink
minus-squaremea_rah@lemmy.worldlinkfedilinkarrow-up6·9 months agoIs that Rust? Assuming a is an Option (which would be close approximation of OP’s nullable type) and assuming b is not null, then this would be closer to the original idea: a.unwrap_or(b) It returns value of a if it’s not None rather than Option.
Is that Rust? Assuming
a
is an Option (which would be close approximation of OP’s nullable type) and assuming b is not null, then this would be closer to the original idea:a.unwrap_or(b)
It returns value of
a
if it’s not None rather than Option.