3 ms·
Yes, every assignment of a non-Copy type is a move. (Copy types are basically primitive ones like ints, so not vectors etc.) The compiler prevents you from usin
by damnyou 7y ago
Yes, every assignment of a non-Copy type is a move. (Copy types are basically primitive ones like ints, so not vectors etc.) The compiler prevents you from using the old variable at that point.
Since Rust always enforces that a move is a memcpy, a vector reallocation is just a realloc() like in C.