diff --git a/src/error/multiple_error_types/option_result.md b/src/error/multiple_error_types/option_result.md index 793673f8df..d2273f698f 100644 --- a/src/error/multiple_error_types/option_result.md +++ b/src/error/multiple_error_types/option_result.md @@ -39,9 +39,7 @@ fn double_first(vec: Vec<&str>) -> Result, ParseIntError> { first.parse::().map(|n| 2 * n) }); - let opt = opt.map_or(Ok(None), |r| r.map(Some))?; - - Ok(opt) + opt.map_or(Ok(None), |r| r.map(Some)) } fn main() {