about summary refs log tree commit diff
path: root/src/liballoc/alloc.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-05-07 12:30:55 +0000
committerbors <bors@rust-lang.org>2018-05-07 12:30:55 +0000
commit62889702c9868682a3112a19c75321508d9eb6e6 (patch)
tree53e852b1e191e001a0c32f9c883583496187dc51 /src/liballoc/alloc.rs
parentc88992d00169f15d8ff9edac8901245b4d21e1c1 (diff)
parent9f8f366eeabee6273abf3628bb75ecd3b4b57f22 (diff)
downloadrust-62889702c9868682a3112a19c75321508d9eb6e6.tar.gz
rust-62889702c9868682a3112a19c75321508d9eb6e6.zip
Auto merge of #50487 - nikic:heap-manually-drop, r=Gankro
Use ManuallyDrop instead of Option in BinaryHeap 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. However I've seen this pattern copied from here to other crates where it is not optimized away, so I think it would be good to change it.
Diffstat (limited to 'src/liballoc/alloc.rs')
0 files changed, 0 insertions, 0 deletions