Skip to content

fix: use clone_from()#5451

Merged
Septias merged 1 commit intomainfrom
sk/clone_from
Apr 10, 2024
Merged

fix: use clone_from()#5451
Septias merged 1 commit intomainfrom
sk/clone_from

Conversation

@Septias
Copy link
Copy Markdown
Collaborator

@Septias Septias commented Apr 10, 2024

a.clone_from(&b) is equivalent to a = b.clone() in functionality, but can be overridden to reuse the resources of a to avoid unnecessary allocations.

@Septias Septias requested review from Hocuri, iequidoo and link2xt and removed request for Hocuri and link2xt April 10, 2024 12:04
@link2xt
Copy link
Copy Markdown
Collaborator

link2xt commented Apr 10, 2024

@Septias Septias merged commit b47cad7 into main Apr 10, 2024
@Septias Septias deleted the sk/clone_from branch April 10, 2024 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants