-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Labels
C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.E-help-wantedCall for participation: Help is requested to fix this issue.Call for participation: Help is requested to fix this issue.I-slowIssue: Problems and improvements with respect to performance of generated code.Issue: Problems and improvements with respect to performance of generated code.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Description
The Clone
trait has a sadly-neglected clone_from
method that clones a value into an existing one. There is a default implementation, but it's fairly naive and therefore not optimal for all cases, notably collections.
It would be good if the major collections had better implementations for clone_from
where it can be implemented more efficiently.
/cc @rust-lang/libs
scottmcm
Metadata
Metadata
Assignees
Labels
C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.E-help-wantedCall for participation: Help is requested to fix this issue.Call for participation: Help is requested to fix this issue.I-slowIssue: Problems and improvements with respect to performance of generated code.Issue: Problems and improvements with respect to performance of generated code.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.