about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-04-23 00:07:19 +0000
committerbors <bors@rust-lang.org>2021-04-23 00:07:19 +0000
commitf4a8cf0a00580eeb093774681db74e5f2ba57c85 (patch)
tree7ac13342483a93312a5cf1e7f7e0929fbffbcae5 /compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
parent7f4afdf0255600306bf67432da722c7b5d2cbf82 (diff)
parentf5d72ab69b997a62dc5c240de1a180b8a96daf71 (diff)
downloadrust-f4a8cf0a00580eeb093774681db74e5f2ba57c85.tar.gz
rust-f4a8cf0a00580eeb093774681db74e5f2ba57c85.zip
Auto merge of #78681 - m-ou-se:binary-heap-retain, r=Amanieu
Improve rebuilding behaviour of BinaryHeap::retain.

This changes `BinaryHeap::retain` such that it doesn't always fully rebuild the heap, but only rebuilds the parts for which that's necessary.

This makes use of the fact that retain gives out `&T`s and not `&mut T`s.

Retaining every element or removing only elements at the end results in no rebuilding at all. Retaining most elements results in only reordering the elements that got moved (those after the first removed element), using the same logic as was already used for `append`.

cc `@KodrAus` `@sfackler` - We briefly discussed this possibility in the meeting last week while we talked about stabilization of this function (#71503).
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp')
0 files changed, 0 insertions, 0 deletions