pub fn free_le(&mut self, to: u64) {
        if self.count == 0 || to < self.buffer[self.start] {
            // out of the left side of the window
            return;
        }

        let mut idx = self.start;
        let mut i = 0;
        while i < self.count {
            if to < self.buffer[idx] {
                // found the first large inflight
                break;
            }
            let size = self.size;
            idx += 1;
            if idx >= size {
                idx -= size;
            }
            i += 1;
        }
        // free i inflights and set new start index
        self.count -= i;
        self.start = idx;
        if self.count == 0 {
            // inflights is empty, reset the start index so that we don't grow the
            // buffer unnecessarily.
            self.start = 0;
        }
    }
/// Frees the inflights smaller or equal to the given `to` flight.
Frees the inflights smaller or equal to the given `to` flight.
Frees the inflights smaller or equal to the given ` to ` flight .
pub fn free_le(&mut self, to: u64) {
        if self.count == 0 || to < self.buffer[self.start] {
            // out of the left side of the window
            return;
        }
        let mut idx = self.start;
        let mut i = 0;
        while i < self.count {
            if to < self.buffer[idx] {
                // found the first large inflight
                break;
            }
            let size = self.size;
            idx += 1;
            if idx >= size {
                idx -= size;
            }
            i += 1;
        }
        // free i inflights and set new start index
        self.count -= i;
        self.start = idx;
        if self.count == 0 {
            // inflights is empty, reset the start index so that we don't grow the
            // buffer unnecessarily.
            self.start = 0;
        }
    }
pub fn free_le ( & mut self , to : u64 ) { if self . count == 0 || to < self . buffer [ self . start ] { // out of the left side of the window return ; } let mut idx = self . start ; let mut i = 0 ; while i < self . count { if to < self . buffer [ idx ] { // found the first large inflight break ; } let size = self . size ; idx += 1 ; if idx >= size { idx -= size ; } i += 1 ; } // free i inflights and set new start index self . count -= i ; self . start = idx ; if self . count == 0 { // inflights is empty, reset the start index so that we don't grow the // buffer unnecessarily. self . start = 0 ; } }
Frees the inflights smaller or equal to the given `to` flight.
Frees the inflights smaller or equal to the given ` to ` flight .
&mut self
to
u64