The original context of my concern is the instance where the match statement makes up the last statement in the function (frequently the only statement in the function's immediate scope). Since the individual cases are not terminating the function early, to get a value out of a match statement you simply leave the last expression bare.
i.e.
fn something... {
match input {
Ok(input_val) => {/* several lines of semicolon terminated code*/
output}
Err(errval) => {/* several more lines of semicolon terminated code */
output}
}
is correct, but fn something... {
match input {
Ok(input_val) => {/* several lines of semicolon terminated code*/
return output;}
Err(errval) => {/* several more lines of semicolon terminated code */
return output;}
}
is poor style, and fn something... {
match input {
Ok(input_val) => {/* several lines of semicolon terminated code*/
output;}
Err(errval => {/* several more lines of semicolon terminated code */
output;}
}
is an error.