summaryrefslogtreecommitdiff
path: root/exercises/if/if2.rs
diff options
context:
space:
mode:
Diffstat (limited to 'exercises/if/if2.rs')
-rw-r--r--exercises/if/if2.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/exercises/if/if2.rs b/exercises/if/if2.rs
index 80effbd..effddbb 100644
--- a/exercises/if/if2.rs
+++ b/exercises/if/if2.rs
@@ -2,11 +2,11 @@
// Step 1: Make me compile!
// Step 2: Get the bar_for_fuzz and default_to_baz tests passing!
-// Execute the command `rustlings hint if2` if you want a hint :)
+// Execute `rustlings hint if2` or use the `hint` watch subcommand for a hint.
// I AM NOT DONE
-pub fn fizz_if_foo(fizzish: &str) -> &str {
+pub fn foo_if_fizz(fizzish: &str) -> &str {
if fizzish == "fizz" {
"foo"
} else {
@@ -21,16 +21,16 @@ mod tests {
#[test]
fn foo_for_fizz() {
- assert_eq!(fizz_if_foo("fizz"), "foo")
+ assert_eq!(foo_if_fizz("fizz"), "foo")
}
#[test]
fn bar_for_fuzz() {
- assert_eq!(fizz_if_foo("fuzz"), "bar")
+ assert_eq!(foo_if_fizz("fuzz"), "bar")
}
#[test]
fn default_to_baz() {
- assert_eq!(fizz_if_foo("literally anything"), "baz")
+ assert_eq!(foo_if_fizz("literally anything"), "baz")
}
}