Skip to content

Commit

Permalink
Merge pull request #1676 from woofyzhao/fix_comment_multiply
Browse files Browse the repository at this point in the history
fix irrelevant comments
  • Loading branch information
marioidival authored Feb 6, 2023
2 parents 055d902 + 2fd82d7 commit efe23c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/error/result/result_map.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ use std::num::ParseIntError;
// As with `Option`, we can use combinators such as `map()`.
// This function is otherwise identical to the one above and reads:
// Modify n if the value is valid, otherwise pass on the error.
// Multiply if both values can be parsed from str, otherwise pass on the error.
fn multiply(first_number_str: &str, second_number_str: &str) -> Result<i32, ParseIntError> {
first_number_str.parse::<i32>().and_then(|first_number| {
second_number_str.parse::<i32>().map(|second_number| first_number * second_number)
Expand Down

0 comments on commit efe23c4

Please sign in to comment.