mirror of
https://github.com/rust-lang/rustlings.git
synced 2026-01-11 05:09:19 +00:00
fix(move_semantics2): Update hint
Add an additional clarification to the third option in the move_semantics2 hint that a reference should be provided.
This commit is contained in:
parent
d27f5a7d41
commit
ec3a0a99bd
@ -195,7 +195,7 @@ all!
|
||||
2. Make `fill_vec` borrow its argument instead of taking ownership of it,
|
||||
and then copy the data within the function in order to return an owned
|
||||
`Vec<i32>`
|
||||
3. Make `fill_vec` *mutably* borrow its argument (which will need to be
|
||||
3. Make `fill_vec` *mutably* borrow a reference to its argument (which will need to be
|
||||
mutable), modify it directly, then not return anything. Then you can get rid
|
||||
of `vec1` entirely -- note that this will change what gets printed by the
|
||||
first `println!`"""
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user