tokio-rs / bytes

Utilities for working with bytes
MIT License
1.86k stars 278 forks source link

Bytes: Use ManuallyDrop instead of mem::forget #678

Closed braddunbar closed 5 months ago

braddunbar commented 5 months ago

Note: The tsan job is failing in CI due to https://github.com/rust-lang/rust/issues/122476, which should be resolved in the next few days.

Much like https://github.com/tokio-rs/bytes/pull/675, I found a few places we can more idiomatically use ManuallyDrop.

braddunbar commented 5 months ago

https://github.com/rust-lang/rust/issues/122476 is fixed now and the tsan job is passing again.