二段matchも書いてみた。
let z = match x {
Err(_) => y,
Ok(false) => match y {
Err(_) => x,
_=>y,
},
_ => x,
};
普通はこんな書き方しないだろうけど。