azdle@news.idlestate.org to Rust@programming.devEnglish · 8 days agothings rust shipped without (2015)graydon2.dreamwidth.orgexternal-linkmessage-square24fedilinkarrow-up133arrow-down12
arrow-up131arrow-down1external-linkthings rust shipped without (2015)graydon2.dreamwidth.orgazdle@news.idlestate.org to Rust@programming.devEnglish · 8 days agomessage-square24fedilink
minus-squaresugar_in_your_tea@sh.itjust.workslinkfedilinkarrow-up1·4 days 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/
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 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.