mirror of
https://github.com/rust-lang/rustlings.git
synced 2026-01-08 11:49:19 +00:00
Exercise 15
This commit is contained in:
parent
97ee2ccda6
commit
205de86a44
@ -5,14 +5,15 @@
|
|||||||
//
|
//
|
||||||
// Execute `rustlings hint if2` or use the `hint` watch subcommand for a hint.
|
// 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 {
|
pub fn foo_if_fizz(fizzish: &str) -> &str {
|
||||||
if fizzish == "fizz" {
|
if fizzish == "fizz" {
|
||||||
"foo"
|
return "foo"
|
||||||
} else {
|
} else if fizzish=="fuzz"{
|
||||||
1
|
return "bar"
|
||||||
}
|
}
|
||||||
|
return "baz"
|
||||||
}
|
}
|
||||||
|
|
||||||
// No test changes needed!
|
// No test changes needed!
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user