summaryrefslogtreecommitdiff
path: root/exercises/move_semantics
diff options
context:
space:
mode:
Diffstat (limited to 'exercises/move_semantics')
-rw-r--r--exercises/move_semantics/move_semantics1.rs4
-rw-r--r--exercises/move_semantics/move_semantics2.rs16
-rw-r--r--exercises/move_semantics/move_semantics3.rs9
-rw-r--r--exercises/move_semantics/move_semantics4.rs11
-rw-r--r--exercises/move_semantics/move_semantics5.rs9
-rw-r--r--exercises/move_semantics/move_semantics6.rs5
6 files changed, 34 insertions, 20 deletions
diff --git a/exercises/move_semantics/move_semantics1.rs b/exercises/move_semantics/move_semantics1.rs
index aac6dfc..710d20d 100644
--- a/exercises/move_semantics/move_semantics1.rs
+++ b/exercises/move_semantics/move_semantics1.rs
@@ -1,5 +1,7 @@
// move_semantics1.rs
-// Execute `rustlings hint move_semantics1` or use the `hint` watch subcommand for a hint.
+//
+// Execute `rustlings hint move_semantics1` or use the `hint` watch subcommand
+// for a hint.
// I AM NOT DONE
diff --git a/exercises/move_semantics/move_semantics2.rs b/exercises/move_semantics/move_semantics2.rs
index 93bb82e..72d37fa 100644
--- a/exercises/move_semantics/move_semantics2.rs
+++ b/exercises/move_semantics/move_semantics2.rs
@@ -1,24 +1,24 @@
// move_semantics2.rs
-// Execute `rustlings hint move_semantics2` or use the `hint` watch subcommand for a hint.
-
+//
// Expected output:
-// vec0 has length 3 content `[22, 44, 66]`
-// vec1 has length 4 content `[22, 44, 66, 88]`
+// vec0 has length 3, with contents `[22, 44, 66]`
+// vec1 has length 4, with contents `[22, 44, 66, 88]`
+//
+// Execute `rustlings hint move_semantics2` or use the `hint` watch subcommand
+// for a hint.
// I AM NOT DONE
fn main() {
let vec0 = Vec::new();
- // Do not move the following line!
let mut vec1 = fill_vec(vec0);
- // Do not change the following line!
- println!("{} has length {} content `{:?}`", "vec0", vec0.len(), vec0);
+ println!("{} has length {}, with contents: `{:?}`", "vec0", vec0.len(), vec0);
vec1.push(88);
- println!("{} has length {} content `{:?}`", "vec1", vec1.len(), vec1);
+ println!("{} has length {}, with contents `{:?}`", "vec1", vec1.len(), vec1);
}
fn fill_vec(vec: Vec<i32>) -> Vec<i32> {
diff --git a/exercises/move_semantics/move_semantics3.rs b/exercises/move_semantics/move_semantics3.rs
index eaa30e3..ea21493 100644
--- a/exercises/move_semantics/move_semantics3.rs
+++ b/exercises/move_semantics/move_semantics3.rs
@@ -1,7 +1,10 @@
// move_semantics3.rs
-// Make me compile without adding new lines-- just changing existing lines!
-// (no lines with multiple semicolons necessary!)
-// Execute `rustlings hint move_semantics3` or use the `hint` watch subcommand for a hint.
+//
+// Make me compile without adding new lines-- just changing existing lines! (no
+// lines with multiple semicolons necessary!)
+//
+// Execute `rustlings hint move_semantics3` or use the `hint` watch subcommand
+// for a hint.
// I AM NOT DONE
diff --git a/exercises/move_semantics/move_semantics4.rs b/exercises/move_semantics/move_semantics4.rs
index 99834ec..75a3b6b 100644
--- a/exercises/move_semantics/move_semantics4.rs
+++ b/exercises/move_semantics/move_semantics4.rs
@@ -1,8 +1,11 @@
// move_semantics4.rs
-// Refactor this code so that instead of passing `vec0` into the `fill_vec` function,
-// the Vector gets created in the function itself and passed back to the main
-// function.
-// Execute `rustlings hint move_semantics4` or use the `hint` watch subcommand for a hint.
+//
+// Refactor this code so that instead of passing `vec0` into the `fill_vec`
+// function, the Vector gets created in the function itself and passed back to
+// the main function.
+//
+// Execute `rustlings hint move_semantics4` or use the `hint` watch subcommand
+// for a hint.
// I AM NOT DONE
diff --git a/exercises/move_semantics/move_semantics5.rs b/exercises/move_semantics/move_semantics5.rs
index 36eae12..68db09e 100644
--- a/exercises/move_semantics/move_semantics5.rs
+++ b/exercises/move_semantics/move_semantics5.rs
@@ -1,7 +1,10 @@
// move_semantics5.rs
-// Make me compile only by reordering the lines in `main()`, but without
-// adding, changing or removing any of them.
-// Execute `rustlings hint move_semantics5` or use the `hint` watch subcommand for a hint.
+//
+// Make me compile only by reordering the lines in `main()`, but without adding,
+// changing or removing any of them.
+//
+// Execute `rustlings hint move_semantics5` or use the `hint` watch subcommand
+// for a hint.
// I AM NOT DONE
diff --git a/exercises/move_semantics/move_semantics6.rs b/exercises/move_semantics/move_semantics6.rs
index eb52a84..cace4ca 100644
--- a/exercises/move_semantics/move_semantics6.rs
+++ b/exercises/move_semantics/move_semantics6.rs
@@ -1,6 +1,9 @@
// move_semantics6.rs
-// Execute `rustlings hint move_semantics6` or use the `hint` watch subcommand for a hint.
+//
// You can't change anything except adding or removing references.
+//
+// Execute `rustlings hint move_semantics6` or use the `hint` watch subcommand
+// for a hint.
// I AM NOT DONE