Exercise 16

This commit is contained in:
akshitgautam42 2023-11-11 20:40:51 +05:30
parent 205de86a44
commit 432720d603

View File

@ -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