I went the “only let introduces bindings” route, and I’m pretty happy so far:
if (left.next(), right.next())
...is (Some(let l), Some(let r)) { /* use l and r */ }...is (Some(let l), None ) { /* use l */ }...is (None, Some(let r)) { /* use r */ }...is (None, None ) { /* use nothing */ }
}
I went the “only
letintroduces bindings” route, and I’m pretty happy so far:if (left.next(), right.next()) ... is (Some(let l), Some(let r)) { /* use l and r */ } ... is (Some(let l), None ) { /* use l */ } ... is (None, Some(let r)) { /* use r */ } ... is (None, None ) { /* use nothing */ } }