Current progress
This commit is contained in:
+2
-1
@@ -1,13 +1,14 @@
|
||||
// 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) { return a; }
|
||||
return b;
|
||||
}
|
||||
|
||||
// Don't mind this for now :)
|
||||
|
||||
+4
-3
@@ -4,13 +4,14 @@
|
||||
// Step 2: Get the bar_for_fuzz and default_to_baz tests passing!
|
||||
// Execute `rustlings hint if2` or use the `hint` watch subcommand for a hint.
|
||||
|
||||
// I AM NOT DONE
|
||||
|
||||
pub fn foo_if_fizz(fizzish: &str) -> &str {
|
||||
if fizzish == "fizz" {
|
||||
"foo"
|
||||
return "foo";
|
||||
} else if (fizzish == "fuzz") {
|
||||
return "bar";
|
||||
} else {
|
||||
1
|
||||
return "baz";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user