Thelie@sh.itjust.works to Programmer Humor@programming.devEnglish · 5 months agoProgramming as a hobby means I can do whatever I want!sh.itjust.worksimagemessage-square6fedilinkarrow-up10arrow-down10
arrow-up10arrow-down1imageProgramming as a hobby means I can do whatever I want!sh.itjust.worksThelie@sh.itjust.works to Programmer Humor@programming.devEnglish · 5 months agomessage-square6fedilink
minus-squareanton@lemmy.blahaj.zonelinkfedilinkarrow-up1·5 months agoInstead of if let Some(a_) = a{ () } else if let Some(b_)=b{ () } else { dostuff } you could just use if a.isNone()&&b.isNone(){ dostuff } Also if you don’t use the value in a match just use _
Instead of
if let Some(a_) = a{ () } else if let Some(b_)=b{ () } else { dostuff }
you could just use
if a.isNone()&&b.isNone(){ dostuff }
Also if you don’t use the value in a match just use
_