Closed
Description
This involves:
- Converting
a <- b
toa = move b
- Converting
a <-> b
toutil::swap(&mut a, &mut b)
orutil::replace()
(I suspect most uses would be better written with the latter) - Implementing
util::swap()
andutil::replace()
unsafely, probably by converting the arguments to unsafe pointers and then using themove_val_init
intrinsic, which moves a value without dropping the previous value