match some_expr {
A => arm_A
B => arm_B
}
right now, it is required that arm_A and arm_B have the same type, or wrapped with a { ... ;}
to force to ()
.
However, if the value of the match is not captured, and the arms are executed for their side effect, why is this required ?
We have situations where HashMap::insert()
has return type Option<V>
, and now we have to wrap in { ... ; }