pub fn push(&mut self, item: T) {
        let old_len = self.len();
        self.data.push(item);
        self.bit.push(false);

        if old_len != 0 {
            // SAFETY: Since we pushed a new item it means that
            //  old_len = self.len() - 1 < self.len()
            unsafe { self.sift_up_push(0, old_len) };
        }
    }
/// Pushes an item onto the binary heap.
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// use weakheap::WeakHeap;
/// let mut heap = WeakHeap::new();
/// heap.push(3);
/// heap.push(5);
/// heap.push(1);
///
/// assert_eq!(heap.len(), 3);
/// assert_eq!(heap.peek(), Some(&5));
/// ```
///
/// # Time complexity
///
/// The expected cost of `push`, averaged over every possible ordering of
/// the elements being pushed, and over a sufficiently large number of
/// pushes, is *O*(1). This is the most meaningful cost metric when pushing
/// elements that are *not* already in any sorted pattern.
///
/// The time complexity degrades if elements are pushed in predominantly
/// ascending order. In the worst case, elements are pushed in ascending
/// sorted order and the amortized cost per push is *O*(log(*n*)) against a heap
/// containing *n* elements.
///
/// The worst case cost of a *single* call to `push` is *O*(*n*). The worst case
/// occurs when capacity is exhausted and needs a resize. The resize cost
/// has been amortized in the previous figures.
Pushes an item onto the binary heap.
Pushes an item onto the binary heap .
pub fn push(&mut self, item: T) {
        let old_len = self.len();
        self.data.push(item);
        self.bit.push(false);
        if old_len != 0 {
            // SAFETY: Since we pushed a new item it means that
            //  old_len = self.len() - 1 < self.len()
            unsafe { self.sift_up_push(0, old_len) };
        }
    }
pub fn push ( & mut self , item : T ) { let old_len = self . len ( ) ; self . data . push ( item ) ; self . bit . push ( false ) ; if old_len != 0 { // SAFETY: Since we pushed a new item it means that //  old_len = self.len() - 1 < self.len() unsafe { self . sift_up_push ( 0 , old_len ) } ; } }
Pushes an item onto the binary heap.
Pushes an item onto the binary heap .
&mut self
item
T
examples
Basic usage.

```
use weakheap::WeakHeap;
let mut heap = WeakHeap::new();
heap.push(3);
heap.push(5);
heap.push(1).


Basic usage . ` ` ` use weakheap :: WeakHeap ; let mut heap = WeakHeap :: new () ; heap . push ( 3 ) ; heap . push ( 5 ) ; heap . push ( 1 ) .
time complexity
The expected cost of `push`, averaged over every possible ordering of
the elements being pushed, and over a sufficiently large number of
pushes, is *O*(1). This is the most meaningful cost metric when pushing
elements that are *not* already in any sorted pattern.

The time complexity degrades if elements are pushed in predominantly
ascending order. In the worst case, elements are pushed in ascending
sorted order and the amortized cost per push is *O*(log(*n*)) against a heap
containing *n* elements.

The worst case cost of a *single* call to `push` is *O*(*n*). The worst case
occurs when capacity is exhausted and needs a resize. The resize cost
has been amortized in the previous figures.
The expected cost of ` push ` averaged over every possible ordering of the elements being pushed and over a sufficiently large number of pushes is * O * ( 1 ) . This is the most meaningful cost metric when pushing elements that are * not * already in any sorted pattern . The time complexity degrades if elements are pushed in predominantly ascending order . In the worst case elements are pushed in ascending sorted order and the amortized cost per push is * O * ( log ( * n * )) against a heap containing * n * elements . The worst case cost of a * single * call to ` push ` is * O * ( * n * ) . The worst case occurs when capacity is exhausted and needs a resize . The resize cost has been amortized in the previous figures .