diff options
Diffstat (limited to 'rustlings/exercises/03_if/if3.rs')
| -rw-r--r-- | rustlings/exercises/03_if/if3.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/rustlings/exercises/03_if/if3.rs b/rustlings/exercises/03_if/if3.rs index 89164eb..fee96f8 100644 --- a/rustlings/exercises/03_if/if3.rs +++ b/rustlings/exercises/03_if/if3.rs @@ -1,13 +1,12 @@ fn animal_habitat(animal: &str) -> &str { - // TODO: Fix the compiler error in the statement below. let identifier = if animal == "crab" { 1 } else if animal == "gopher" { - 2.0 + 2 } else if animal == "snake" { 3 } else { - "Unknown" + 0 }; // Don't change the expression below! |