Closed grahamking closed 2 years ago
mem::replace
mem::take
as_ref()
|ref s|
ref
For consideration. I think these are both safe, and all the tests in this repo pass, but I'm not sure how to try this out on a bigger repo.
mem::replace
with Vec ->mem::take
(because Vec implements Default).as_ref()
with|ref s|
-> remove theref
(reference to a reference).For consideration. I think these are both safe, and all the tests in this repo pass, but I'm not sure how to try this out on a bigger repo.