azdle@news.idlestate.org to Rust@programming.devEnglish · 2 months agothings rust shipped without (2015)graydon2.dreamwidth.orgexternal-linkmessage-square25fedilinkarrow-up133arrow-down12cross-posted to: lobsters
arrow-up131arrow-down1external-linkthings rust shipped without (2015)graydon2.dreamwidth.orgazdle@news.idlestate.org to Rust@programming.devEnglish · 2 months agomessage-square25fedilinkcross-posted to: lobsters
minus-squaresugar_in_your_tea@sh.itjust.workslinkfedilinkarrow-up1·2 months agoYeah, they could literally have the same syntax as now, but w/ let when introducing a variable. So: match (left.next(), right.next()) { (Some(let l), Some(let r)) => {} (Some(let l), None) => {} (None, Some(let l)) => {} (None, None) => {} } Or you could put the let before the Some(...) as let Some(l), which allows us to keep the current if let Some(...) = ... syntax. Either of those would feel more consistent than the current implementation.
Yeah, they could literally have the same syntax as now, but w/
letwhen introducing a variable. So:match (left.next(), right.next()) { (Some(let l), Some(let r)) => {} (Some(let l), None) => {} (None, Some(let l)) => {} (None, None) => {} }Or you could put the
letbefore theSome(...)aslet Some(l), which allows us to keep the currentif let Some(...) = ...syntax. Either of those would feel more consistent than the current implementation.