You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Converting a <-> b to util::swap(&mut a, &mut b) or util::replace() (I suspect most uses would be better written with the latter)
Implementing util::swap() and util::replace() unsafely, probably by converting the arguments to unsafe pointers and then using the move_val_init intrinsic, which moves a value without dropping the previous value
This involves:
a <- btoa = move ba <-> btoutil::swap(&mut a, &mut b)orutil::replace()(I suspect most uses would be better written with the latter)util::swap()andutil::replace()unsafely, probably by converting the arguments to unsafe pointers and then using themove_val_initintrinsic, which moves a value without dropping the previous value