diff options
| author | Nikita Popov <nikita.ppv@gmail.com> | 2018-05-06 16:55:04 +0200 |
|---|---|---|
| committer | Nikita Popov <nikita.ppv@gmail.com> | 2018-05-06 16:55:40 +0200 |
| commit | 9f8f366eeabee6273abf3628bb75ecd3b4b57f22 (patch) | |
| tree | 62ff11799111acb1f37e308647a694538a22b7dd /src/liballoc/string.rs | |
| parent | 6f721f54c6fb1de9cf00eb9d2d050f818c882871 (diff) | |
| download | rust-9f8f366eeabee6273abf3628bb75ecd3b4b57f22.tar.gz rust-9f8f366eeabee6273abf3628bb75ecd3b4b57f22.zip | |
Use ManuallyDrop instead of Option in Hole implementation
The Option is always Some until drop, where it becomes None. Make this more explicit and avoid unwraps by using ManuallyDrop. This change should be performance-neutral as LLVM already optimizes the unwraps away in the inlined code.
Diffstat (limited to 'src/liballoc/string.rs')
0 files changed, 0 insertions, 0 deletions
