2 Checks for `std::mem::replace` on a value of type
3 `T` with `T::default()`.
6 `std::mem` module already has the method `take` to
7 take the current value and replace it with the default value of that type.
11 let mut text = String::from("foo");
12 let replaced = std::mem::replace(&mut text, String::default());
14 Is better expressed with:
16 let mut text = String::from("foo");
17 let taken = std::mem::take(&mut text);