This commit is contained in:
Polycarbohydrate 2025-03-14 18:13:32 +07:00 committed by GitHub
commit dafc7e701c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2,6 +2,8 @@ fn animal_habitat(animal: &str) -> &str {
let identifier = if animal == "crab" {
1
} else if animal == "gopher" {
// all branches of an if expression must return the same type
// so we change from f64 to i32
2
} else if animal == "snake" {
3