summaryrefslogtreecommitdiff
path: root/info.toml
diff options
context:
space:
mode:
authormokou <mokou@fastmail.com>2022-07-14 12:18:21 +0200
committermokou <mokou@fastmail.com>2022-07-14 12:18:21 +0200
commitf5e4c16eed0c9e86398284bb6732981c3cc074c8 (patch)
tree1b6a8aed1f93e7d17b57c55e0e210518f443398d /info.toml
parentc6bc97adc10aecbf6a1ba5ff5c7beda1f421a098 (diff)
feat(strings): move before modules
Diffstat (limited to 'info.toml')
-rw-r--r--info.toml46
1 files changed, 23 insertions, 23 deletions
diff --git a/info.toml b/info.toml
index b1e448c..8174fc8 100644
--- a/info.toml
+++ b/info.toml
@@ -420,6 +420,29 @@ and then create a match expression in `process()`.
Note that you need to deconstruct some message variants
in the match expression to get value in the variant."""
+# STRINGS
+
+[[exercises]]
+name = "strings1"
+path = "exercises/strings/strings1.rs"
+mode = "compile"
+hint = """
+The `current_favorite_color` function is currently returning a string slice with the `'static`
+lifetime. We know this because the data of the string lives in our code itself -- it doesn't
+come from a file or user input or another program -- so it will live as long as our program
+lives. But it is still a string slice. There's one way to create a `String` by converting a
+string slice covered in the Strings chapter of the book, and another way that uses the `From`
+trait."""
+
+[[exercises]]
+name = "strings2"
+path = "exercises/strings/strings2.rs"
+mode = "compile"
+hint = """
+Yes, it would be really easy to fix this by just changing the value bound to `word` to be a
+string slice instead of a `String`, wouldn't it?? There is a way to add one character to line
+9, though, that will coerce the `String` into a string slice."""
+
# MODULES
[[exercises]]
@@ -472,29 +495,6 @@ Use the `entry()` and `or_insert()` methods of `HashMap` to achieve this.
Learn more at https://doc.rust-lang.org/stable/book/ch08-03-hash-maps.html#only-inserting-a-value-if-the-key-has-no-value
"""
-# STRINGS
-
-[[exercises]]
-name = "strings1"
-path = "exercises/strings/strings1.rs"
-mode = "compile"
-hint = """
-The `current_favorite_color` function is currently returning a string slice with the `'static`
-lifetime. We know this because the data of the string lives in our code itself -- it doesn't
-come from a file or user input or another program -- so it will live as long as our program
-lives. But it is still a string slice. There's one way to create a `String` by converting a
-string slice covered in the Strings chapter of the book, and another way that uses the `From`
-trait."""
-
-[[exercises]]
-name = "strings2"
-path = "exercises/strings/strings2.rs"
-mode = "compile"
-hint = """
-Yes, it would be really easy to fix this by just changing the value bound to `word` to be a
-string slice instead of a `String`, wouldn't it?? There is a way to add one character to line
-9, though, that will coerce the `String` into a string slice."""
-
# TEST 2
[[exercises]]