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

Use ManuallyDrop instead of mem::forget #675

Merged
merged 3 commits into from
Mar 14, 2024

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
15 checks passed
@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