rust/library/alloc
bors a409a233e0 Auto merge of #75974 - SkiFire13:peekmut-opt-sift, r=LukasKalbertodt
Avoid useless sift_down when std::collections::binary_heap::PeekMut is never mutably dereferenced

If `deref_mut` is never called then it's not possible for the element to be mutated without internal mutability, meaning there's no need to call `sift_down`.

This could be a little improvement in cases where you want to mutate the biggest element of the heap only if it satisfies a certain predicate that needs only read access to the element.
2020-09-21 05:31:01 +00:00
..
benches Auto merge of #75974 - SkiFire13:peekmut-opt-sift, r=LukasKalbertodt 2020-09-21 05:31:01 +00:00
src Auto merge of #75974 - SkiFire13:peekmut-opt-sift, r=LukasKalbertodt 2020-09-21 05:31:01 +00:00
tests Use T::BITS instead of size_of::<T> * 8. 2020-09-19 06:54:42 +02:00
Cargo.toml