diff --git a/exercises/02_functions/functions5.rs b/exercises/02_functions/functions5.rs index 45e76077..c49123ce 100644 --- a/exercises/02_functions/functions5.rs +++ b/exercises/02_functions/functions5.rs @@ -3,7 +3,6 @@ // 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/03_if/if1.rs b/exercises/03_if/if1.rs index 4734d78f..e1e3bf37 100644 --- a/exercises/03_if/if1.rs +++ b/exercises/03_if/if1.rs @@ -2,13 +2,18 @@ // // 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 { + return a; + } else { + return b; + } } // Don't mind this for now :) diff --git a/exercises/03_if/if2.rs b/exercises/03_if/if2.rs index f512f13f..3cbe580e 100644 --- a/exercises/03_if/if2.rs +++ b/exercises/03_if/if2.rs @@ -7,6 +7,8 @@ // I AM NOT DONE + + pub fn foo_if_fizz(fizzish: &str) -> &str { if fizzish == "fizz" { "foo"