Skip to content

Commit 055d902

Browse files
authored
Merge pull request #1675 from woofyzhao/fix_cookable_v1
remove redudant code
2 parents 2268598 + b498374 commit 055d902

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/error/option_unwrap/and_then.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,7 @@ fn have_recipe(food: Food) -> Option<Food> {
3939
fn cookable_v1(food: Food) -> Option<Food> {
4040
match have_recipe(food) {
4141
None => None,
42-
Some(food) => match have_ingredients(food) {
43-
None => None,
44-
Some(food) => Some(food),
45-
},
42+
Some(food) => have_ingredients(food),
4643
}
4744
}
4845

0 commit comments

Comments
 (0)