Merge pull request #15 from akshitgautam42/Ex-16

Exercise 16
This commit is contained in:
Akshit Gautam 2023-11-11 20:46:22 +05:30 committed by GitHub
commit 894362278f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,17 +2,17 @@
// //
// Execute `rustlings hint if3` or use the `hint` watch subcommand for a hint. // 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 { pub fn animal_habitat(animal: &str) -> &'static str {
let identifier = if animal == "crab" { let identifier = if animal == "crab" {
1 1
} else if animal == "gopher" { } else if animal == "gopher" {
2.0 2
} else if animal == "snake" { } else if animal == "snake" {
3 3
} else { } else {
"Unknown" 10
}; };
// DO NOT CHANGE THIS STATEMENT BELOW // DO NOT CHANGE THIS STATEMENT BELOW