Skip to content

Commit b498374

Browse files
committed
remove redudant code
1 parent 2268598 commit b498374

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)