summaryrefslogtreecommitdiffstats
path: root/src/doc/rust-by-example/src/error/option_unwrap/and_then.md
diff options
context:
space:
mode:
Diffstat (limited to 'src/doc/rust-by-example/src/error/option_unwrap/and_then.md')
-rw-r--r--src/doc/rust-by-example/src/error/option_unwrap/and_then.md5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/doc/rust-by-example/src/error/option_unwrap/and_then.md b/src/doc/rust-by-example/src/error/option_unwrap/and_then.md
index c065f2043..42a1f3ec0 100644
--- a/src/doc/rust-by-example/src/error/option_unwrap/and_then.md
+++ b/src/doc/rust-by-example/src/error/option_unwrap/and_then.md
@@ -39,10 +39,7 @@ fn have_recipe(food: Food) -> Option<Food> {
fn cookable_v1(food: Food) -> Option<Food> {
match have_recipe(food) {
None => None,
- Some(food) => match have_ingredients(food) {
- None => None,
- Some(food) => Some(food),
- },
+ Some(food) => have_ingredients(food),
}
}