summaryrefslogtreecommitdiff
path: root/rustlings-macros/info.toml
diff options
context:
space:
mode:
authormo8it <mo8it@proton.me>2024-06-21 18:14:19 +0200
committermo8it <mo8it@proton.me>2024-06-21 18:14:19 +0200
commite4dbbbf5f5f5d4ea0ede1ead1f82108968e6cea6 (patch)
treec69d3486b375e4642faac66b57c9eed8e0f249cd /rustlings-macros/info.toml
parentfd558065c7f32d38d1b8e34fda1a23fe40d1b3ab (diff)
Remove move_semantics4, add rest of move_semantics solutions
Diffstat (limited to 'rustlings-macros/info.toml')
-rw-r--r--rustlings-macros/info.toml27
1 files changed, 5 insertions, 22 deletions
diff --git a/rustlings-macros/info.toml b/rustlings-macros/info.toml
index fb0126c..d6236c5 100644
--- a/rustlings-macros/info.toml
+++ b/rustlings-macros/info.toml
@@ -371,28 +371,15 @@ an existing binding to be a mutable binding instead of an immutable one :)"""
name = "move_semantics4"
dir = "06_move_semantics"
hint = """
-Stop reading whenever you feel like you have enough direction :) Or try
-doing one step and then fixing the compiler errors that result!
-So the end goal is to:
- - get rid of the first line in main that creates the new vector
- - so then `vec0` doesn't exist, so we can't pass it to `fill_vec`
- - `fill_vec` has had its signature changed, which our call should reflect
- - since we're not creating a new vec in `main` anymore, we need to create
- a new vec in `fill_vec`, and fill it with the expected values"""
-
-[[exercises]]
-name = "move_semantics5"
-dir = "06_move_semantics"
-hint = """
Carefully reason about the range in which each mutable reference is in
scope. Does it help to update the value of referent (`x`) immediately after
-the mutable reference is taken? Read more about 'Mutable References'
-in the book's section 'References and Borrowing':
+the mutable reference is taken?
+Read more about 'Mutable References' in the book's section 'References and Borrowing':
https://doc.rust-lang.org/book/ch04-02-references-and-borrowing.html#mutable-references.
"""
[[exercises]]
-name = "move_semantics6"
+name = "move_semantics5"
dir = "06_move_semantics"
test = false
hint = """
@@ -401,14 +388,10 @@ https://doc.rust-lang.org/stable/book/ch04-02-references-and-borrowing.html
The first problem is that `get_char` is taking ownership of the string. So
`data` is moved and can't be used for `string_uppercase`. `data` is moved to
-`get_char` first, meaning that `string_uppercase` cannot manipulate the data.
+`get_char` first, meaning that `string_uppercase` can't manipulate the data.
Once you've fixed that, `string_uppercase`'s function signature will also need
-to be adjusted.
-
-Can you figure out how?
-
-Another hint: it has to do with the `&` character."""
+to be adjusted."""
# STRUCTS