Closed aDotInTheVoid closed 4 years ago
If the result of mem::replace is not used, it is equivalent to assignment. This way the code is more readable and doesn't give compiler warnings.
mem::replace
If there is an advantage to using mem::replace, let me know.
If the result of
mem::replace
is not used, it is equivalent to assignment. This way the code is more readable and doesn't give compiler warnings.If there is an advantage to using
mem::replace
, let me know.