There can be only one let
, but it can be a tuple that expects multiple things. This is equivalent of a && b
:
if let =
There's a .zip()
method on Option
:
if let Some = a.zip
For a || b
you can use the .or()
method of Option
and Result
:
if let Some = a.or
Try it: Rust Playground