Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a resource-reusing method to ToOwned #41009

Merged
merged 1 commit into from
Apr 13, 2017

Commits on Apr 13, 2017

  1. Add ToOwned::clone_into (unstable as toowned_clone_into)

    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.
    scottmcm committed Apr 13, 2017
    Configuration menu
    Copy the full SHA
    7ec27ae View commit details
    Browse the repository at this point in the history