Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUST

rust vec cannot move

You can't do a move using an indexing op because they are defined using references. Rust is notably missing a move reference, so you can't use an indexing op to move out of a vector.

Use .get() or .get_mut()
Source by users.rust-lang.org #
 
PREVIOUS NEXT
Tagged: #rust #vec #move
ADD COMMENT
Topic
Name
2+8 =