diff --git a/src/binary_heap.rs b/src/binary_heap.rs index 496d4a2..4f62a34 100644 --- a/src/binary_heap.rs +++ b/src/binary_heap.rs @@ -157,7 +157,7 @@ use std::slice; // use std::vec::Drain; use compare::Compare; use core::fmt; -use core::mem::{size_of, swap, ManuallyDrop}; +use core::mem::{swap, ManuallyDrop}; use core::ptr; #[cfg(feature = "serde")] use serde::{Deserialize, Serialize}; @@ -1008,11 +1008,9 @@ impl> BinaryHeap { let tail_len = self.len() - start; - // `usize::BITS` requires Rust 1.53.0 or greater. - #[allow(clippy::manual_bits)] #[inline(always)] fn log2_fast(x: usize) -> usize { - 8 * size_of::() - (x.leading_zeros() as usize) - 1 + (usize::BITS - x.leading_zeros() - 1) as usize } // `rebuild` takes O(self.len()) operations