mirror of
https://git.aramjonghu.dev/AramJonghu/rustlings.git
synced 2026-09-01 07:53:30 +02:00
Explain changed line in if3 solution
This commit is contained in:
@@ -2,6 +2,7 @@ fn animal_habitat(animal: &str) -> &str {
|
||||
let identifier = if animal == "crab" {
|
||||
1
|
||||
} else if animal == "gopher" {
|
||||
// Integer, so that every branch has the same type.
|
||||
2
|
||||
} else if animal == "snake" {
|
||||
3
|
||||
|
||||
Reference in New Issue
Block a user