mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-22 10:05:06 +03:00
7ec27ae63d
to_owned generalizes clone; this generalizes clone_from. Use to_owned to give it a default impl. Customize the impl for [T], str, and T:Clone. Use it in Cow::clone_from to reuse resources when cloning Owned into Owned.