Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions solutions/03_if/if3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down