mirror of
https://github.com/rust-lang/rustlings.git
synced 2026-01-07 03:09:19 +00:00
commit
894362278f
@ -2,17 +2,17 @@
|
||||
//
|
||||
// Execute `rustlings hint if3` or use the `hint` watch subcommand for a hint.
|
||||
|
||||
// I AM NOT DONE
|
||||
|
||||
|
||||
pub fn animal_habitat(animal: &str) -> &'static str {
|
||||
let identifier = if animal == "crab" {
|
||||
1
|
||||
} else if animal == "gopher" {
|
||||
2.0
|
||||
2
|
||||
} else if animal == "snake" {
|
||||
3
|
||||
} else {
|
||||
"Unknown"
|
||||
10
|
||||
};
|
||||
|
||||
// DO NOT CHANGE THIS STATEMENT BELOW
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user