diff --git a/exercises/functions/functions5.rs b/exercises/functions/functions5.rs index 5fa8278c..3da51720 100644 --- a/exercises/functions/functions5.rs +++ b/exercises/functions/functions5.rs @@ -1,7 +1,7 @@ // functions5.rs // Execute `rustlings hint functions5` or use the `hint` watch subcommand for a hint. -// I AM NOT DONE + fn main() { let answer = square(3); diff --git a/exercises/if/if1.rs b/exercises/if/if1.rs index 587e03f8..5c1a14d8 100644 --- a/exercises/if/if1.rs +++ b/exercises/if/if1.rs @@ -1,13 +1,18 @@ // if1.rs // Execute `rustlings hint if1` or use the `hint` watch subcommand for a hint. -// I AM NOT DONE + pub fn bigger(a: i32, b: i32) -> i32 { // Complete this function to return the bigger number! // Do not use: // - another function call // - additional variables + if a > b { + a + }else{ + b + } } // Don't mind this for now :) diff --git a/exercises/if/if2.rs b/exercises/if/if2.rs index effddbb6..86e1295d 100644 --- a/exercises/if/if2.rs +++ b/exercises/if/if2.rs @@ -9,8 +9,10 @@ pub fn foo_if_fizz(fizzish: &str) -> &str { if fizzish == "fizz" { "foo" - } else { - 1 + } else if fizzish == "fuzz" { + "bar" + }else { + "baz" } }