From 205de86a444f8d9d498b08e8d2e3909afc5d0c67 Mon Sep 17 00:00:00 2001 From: akshitgautam42 Date: Sat, 11 Nov 2023 20:38:43 +0530 Subject: [PATCH] Exercise 15 --- exercises/03_if/if2.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/exercises/03_if/if2.rs b/exercises/03_if/if2.rs index f512f13f..19de2f6c 100644 --- a/exercises/03_if/if2.rs +++ b/exercises/03_if/if2.rs @@ -5,14 +5,15 @@ // // Execute `rustlings hint if2` or use the `hint` watch subcommand for a hint. -// I AM NOT DONE + pub fn foo_if_fizz(fizzish: &str) -> &str { if fizzish == "fizz" { - "foo" - } else { - 1 + return "foo" + } else if fizzish=="fuzz"{ + return "bar" } + return "baz" } // No test changes needed!