diff --git a/exercises/06_move_semantics/move_semantics3.rs b/exercises/06_move_semantics/move_semantics3.rs index c47a17c6..8d50352f 100644 --- a/exercises/06_move_semantics/move_semantics3.rs +++ b/exercises/06_move_semantics/move_semantics3.rs @@ -6,7 +6,7 @@ // Execute `rustlings hint move_semantics3` or use the `hint` watch subcommand // for a hint. -// I AM NOT DONE + #[test] fn main() { diff --git a/exercises/06_move_semantics/move_semantics4.rs b/exercises/06_move_semantics/move_semantics4.rs index 80b49dba..c8df5ce7 100644 --- a/exercises/06_move_semantics/move_semantics4.rs +++ b/exercises/06_move_semantics/move_semantics4.rs @@ -7,19 +7,19 @@ // Execute `rustlings hint move_semantics4` or use the `hint` watch subcommand // for a hint. -// I AM NOT DONE + #[test] fn main() { let vec0 = vec![22, 44, 66]; - let mut vec1 = fill_vec(vec0); + let mut vec1 = fill_vec(vec0.clone()); assert_eq!(vec1, vec![22, 44, 66, 88]); } // `fill_vec()` no longer takes `vec: Vec` as argument - don't change this! -fn fill_vec() -> Vec { +fn fill_vec(vec:Vec) -> Vec { // Instead, let's create and fill the Vec in here - how do you do that? let mut vec = vec;