Skip to content

Conversation

@braddunbar
Copy link
Contributor

This change converts several usages of mem::forget to ManuallyDrop as recommended in the docs for mem::forget.

While mem::forget can also be used to transfer memory ownership, doing so is error-prone. ManuallyDrop should be used instead.

Copy link
Contributor

@Darksonn Darksonn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you.

@Darksonn Darksonn merged commit 536db06 into tokio-rs:master Mar 14, 2024
@braddunbar braddunbar deleted the manually-drop branch March 14, 2024 15:52
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