pub fn shrink_references<T: RangeBounds<usize>>(&mut self, range: T) -> Vec<Cell> {
        let refs_count = self.remaining_references();
        let start = match range.start_bound() {
            Bound::Included(start) => *start,
            Bound::Excluded(start) => start + 1,
            Bound::Unbounded => 0
        };
        let end = match range.end_bound() {
            Bound::Included(end) => end + 1,
            Bound::Excluded(end) => *end,
            Bound::Unbounded => refs_count
        };

        let mut vec = vec![];
        if (start <= end) && (end <= refs_count) {
            (0..start).for_each(|i| vec.push(self.reference(i).unwrap()));
            (end..refs_count).for_each(|i| vec.push(self.reference(i).unwrap()));
            self.references_window.end = self.references_window.start + end;
            self.references_window.start += start;
        }
        vec
    }
/// shrinks references_window: range - subrange of current window, returns shrinked references
shrinks references_window: range - subrange of current window, returns shrinked references
shrinks references_window : range - subrange of current window returns shrinked references
pub fn shrink_references<T: RangeBounds<usize>>(&mut self, range: T) -> Vec<Cell> {
        let refs_count = self.remaining_references();
        let start = match range.start_bound() {
            Bound::Included(start) => *start,
            Bound::Excluded(start) => start + 1,
            Bound::Unbounded => 0
        };
        let end = match range.end_bound() {
            Bound::Included(end) => end + 1,
            Bound::Excluded(end) => *end,
            Bound::Unbounded => refs_count
        };
        let mut vec = vec![];
        if (start <= end) && (end <= refs_count) {
            (0..start).for_each(|i| vec.push(self.reference(i).unwrap()));
            (end..refs_count).for_each(|i| vec.push(self.reference(i).unwrap()));
            self.references_window.end = self.references_window.start + end;
            self.references_window.start += start;
        }
        vec
    }
pub fn shrink_references < T : RangeBounds < usize > > ( & mut self , range : T ) -> Vec < Cell > { let refs_count = self . remaining_references ( ) ; let start = match range . start_bound ( ) { Bound :: Included ( start ) => * start , Bound :: Excluded ( start ) => start + 1 , Bound :: Unbounded => 0 } ; let end = match range . end_bound ( ) { Bound :: Included ( end ) => end + 1 , Bound :: Excluded ( end ) => * end , Bound :: Unbounded => refs_count } ; let mut vec = vec ! [ ] ; if ( start <= end ) && ( end <= refs_count ) { ( 0 .. start ) . for_each ( | i | vec . push ( self . reference ( i ) . unwrap ( ) ) ) ; ( end .. refs_count ) . for_each ( | i | vec . push ( self . reference ( i ) . unwrap ( ) ) ) ; self . references_window . end = self . references_window . start + end ; self . references_window . start += start ; } vec }
shrinks references_window: range - subrange of current window, returns shrinked references
shrinks references_window : range - subrange of current window returns shrinked references
&mut self
range
T
&mut self
range
T