summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormokou <mokou@fastmail.com>2022-07-14 17:53:42 +0200
committermokou <mokou@fastmail.com>2022-07-14 17:53:42 +0200
commitb71feed82464f476611765e8621b32e615b5dddc (patch)
treef02a68e8babfd20c809a584d08596c402a9e1de7
parent06e4fd376586709082664a304f0394244d4ab6bd (diff)
feat(options): add hint comments
-rw-r--r--exercises/options/options2.rs2
-rw-r--r--exercises/options/options3.rs2
-rw-r--r--info.toml15
3 files changed, 6 insertions, 13 deletions
diff --git a/exercises/options/options2.rs b/exercises/options/options2.rs
index a1c21d3..75b66a3 100644
--- a/exercises/options/options2.rs
+++ b/exercises/options/options2.rs
@@ -1,5 +1,5 @@
// options2.rs
-// Make me compile! Execute `rustlings hint option2` for hints
+// Execute `rustlings hint options2` or use the `hint` watch subcommand for a hint.
// I AM NOT DONE
diff --git a/exercises/options/options3.rs b/exercises/options/options3.rs
index 4cba4ad..3f995c5 100644
--- a/exercises/options/options3.rs
+++ b/exercises/options/options3.rs
@@ -1,5 +1,5 @@
// options3.rs
-// Make me compile! Execute `rustlings hint option3` for hints
+// Execute `rustlings hint options3` or use the `hint` watch subcommand for a hint.
// I AM NOT DONE
diff --git a/info.toml b/info.toml
index 6bcf278..b13ed45 100644
--- a/info.toml
+++ b/info.toml
@@ -536,18 +536,11 @@ hint = "No hints this time ;)"
[[exercises]]
name = "options1"
path = "exercises/options/options1.rs"
-mode = "compile"
+mode = "test"
hint = """
-Hint 1: Check out some functions of Option:
-is_some
-is_none
-unwrap
-
-and:
-pattern matching
-
-Hint 2: There are no sensible defaults for the value of an Array; the values need to be filled before use.
-"""
+Options can have a Some value, with an inner value, or a None value, without an inner value.
+There's multiple ways to get at the inner value, you can use unwrap, or pattern match. Unwrapping
+is the easiest, but how do you do it safely so that it doesn't panic in your face later?"""
[[exercises]]
name = "options2"