summaryrefslogtreecommitdiff
path: root/rustlings/exercises/03_if/if2.rs
diff options
context:
space:
mode:
Diffstat (limited to 'rustlings/exercises/03_if/if2.rs')
-rw-r--r--rustlings/exercises/03_if/if2.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/rustlings/exercises/03_if/if2.rs b/rustlings/exercises/03_if/if2.rs
index ca8493c..8104487 100644
--- a/rustlings/exercises/03_if/if2.rs
+++ b/rustlings/exercises/03_if/if2.rs
@@ -2,8 +2,10 @@
fn picky_eater(food: &str) -> &str {
if food == "strawberry" {
"Yummy!"
+ } else if food == "potato" {
+ "I guess I can eat that."
} else {
- 1
+ "No thanks!"
}
}