From 432720d603af1f42dcfa1b47f17545af4979e9af Mon Sep 17 00:00:00 2001 From: akshitgautam42 Date: Sat, 11 Nov 2023 20:40:51 +0530 Subject: [PATCH] Exercise 16 --- exercises/03_if/if3.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/exercises/03_if/if3.rs b/exercises/03_if/if3.rs index 16962740..db139691 100644 --- a/exercises/03_if/if3.rs +++ b/exercises/03_if/if3.rs @@ -2,17 +2,17 @@ // // 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 { let identifier = if animal == "crab" { 1 } else if animal == "gopher" { - 2.0 + 2 } else if animal == "snake" { 3 } else { - "Unknown" + 10 }; // DO NOT CHANGE THIS STATEMENT BELOW